Custom keyboard shortcuts are reset. How can I make them set permanently?
Thanks to Graham's links, it seems this was fixed for 13.04 but not "backported" to 12.10.
Update Amazingly.. this doesn't appear to be fixed in 13.04 release! :( I still had to use solution below.
Until then here's something I've pieced together from the comments on launchpad, it works for me on Ubuntu 12.10.
/etc/rc.local didn't work for me, so I created ~/.config/autostart/key_settings.desktop
:
[Desktop Entry]
Type=Application
Exec=sh -c 'sleep 1; exec ~/.config/autostart/key_settings.sh'
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Load My Custom Shortcuts
Then the actual script ~/.config/autostart/key_settings.sh
:
#!/bin/sh -e
#
#dconf write /org/gnome/desktop/wm/keybindings/minimize "['<Super>h']"
#dconf write /org/gnome/desktop/wm/keybindings/close "['<Super>q']"
gsettings set org.gnome.desktop.wm.keybindings minimize "['<Super>h']"
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>q']"
Commented out the dconf method for reference, though gsettings works for me.
To find the keycodes, you can simply use Keyboard Shortcuts window open next to Terminal, then use the "get" command:
gsettings get org.gnome.desktop.wm.keybindings minimize
PS: this was meant more to elaborate on a practical fix suggested by Graham's links.
This seems to be related to a series of bugs on launchpad.
-
Ubuntu 12.10 The first answer to this post has a workaround using
gsettings set org.gnome.desktop.wm.keybindings <command> "[<key-sequence>]"
within your startup script. - Ubuntu 12.10 - I'm guessing it should be merged with the first
- Ubuntu 12.04