1

How can I disable Alt-Tab application switching in Cinnamon when a certain program is open? In System Settings > Keyboard > Shortcuts Tried to disable, click on it to set a new shortcut, then pressing Backspace to set disable that shortcut.

Using gsettings commands The keybindings to switch to another workspace are set in:

org.gnome.desktop.wm.keybindings

gsettings set org.gnome.desktop.wm.keybindings switch-applications []
gsettings set org.gnome.desktop.wm.keybindings switch-applications-background []

I have tried these many methods to disable alt+tab key but still not disabled. Maybe I need to set it globally but in ubuntu where alt+tab key values stored, I don't known. Please help me on this.

N0rbert
  • 99,918
Dinesh
  • 129

1 Answers1

2

Try to change it with dconf (from dconf-cli package):

dconf load / << EOF 
[org/compiz]
current-profile='unity'

[org/compiz/profiles/unity/plugins/unityshell]
alt-tab-prev='Disabled'
launcher-switcher-prev='Disabled'
alt-tab-forward='Disabled'
launcher-switcher-forward='Disabled'
alt-tab-forward-all='Disabled'
alt-tab-prev-all='Disabled'

[org/compiz/profiles/unity/plugins/switcher]
prev-all-key='Disabled'
prev-key='Disabled'
next-all-key='Disabled'
next-key='Disabled'

[org/compiz/profiles/unity/plugins/staticswitcher]
prev-all-key='Disabled'
next-all-key='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/unityshell]
alt-tab-prev='Disabled'
launcher-switcher-prev='Disabled'
alt-tab-forward='Disabled'
launcher-switcher-forward='Disabled'
alt-tab-forward-all='Disabled'
alt-tab-prev-all='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/switcher]
prev-all-key='Disabled'
prev-key='Disabled'
next-all-key='Disabled'
next-key='Disabled'

[org/compiz/profiles/unity-lowgfx/plugins/staticswitcher]
prev-all-key='Disabled'
next-all-key='Disabled'
EOF

Notes:

  1. this will disable all occurrences of Tab key.
  2. on my VirtualBox 16.04 LTS has two Compiz profiles - unity and unity-lowgfx. If you are sure that you have only unity you can skip unity-lowgfx.

You can revert to default settings with

dconf reset /org/compiz/profiles/unity-lowgfx -f
dconf reset /org/compiz/profiles/unity -f

then logout and login again.

N0rbert
  • 99,918
  • I tried the above code but still issue remains. Please let me know alternatives ways to do it. – Dinesh Jan 04 '18 at 14:20
  • I updated my answer. It was not too simple. – N0rbert Jan 04 '18 at 20:12
  • Great !! It works fine. – Dinesh Jan 05 '18 at 09:28
  • Do not forget to vote and accept it if it helped :) – N0rbert Jan 05 '18 at 12:31
  • dconf load / << EOF

    [org/gnome/desktop/wm/keybindings] show-desktop='Disabled' maximize='Disabled' unmaximize='Disabled' EOF. I have tried this. should I try it for unity-lowgfx? Please suggest on this.

    – Dinesh Jan 09 '18 at 12:21
  • I was testing this on VirtualBox, it spontaneously switches between profiles. On real hardware you do not need unity-lowgfx profile I think. – N0rbert Jan 09 '18 at 15:01
  • @Norbert , is it possible to unload above dconf command permanently from the dconf database – Dinesh Jan 31 '18 at 04:54
  • I think you should use dconf reset /org/compiz/profiles/unity-lowgfx -f and dconf reset /org/compiz/profiles/unity -f. – N0rbert Jan 31 '18 at 08:50
  • I do not understand. The above two commands will remove our custom settings from dconf. You can consult dconf help reset for details. – N0rbert Jan 31 '18 at 10:11