The keyboard-settings pane in Ubuntu allows custom keyboard combinations to launch applications or scripts. This feature is currently missing from elementary OS’s keyboard plug. However, with a little command line foo we can setup the keybindings without the GUI.
First we need to install gconf2. It may be installed already, but in case it’s not:
sudo apt-get install gconf2
Next we use gconf tool to query which keybindings are already out there:
gconftool-2 --all-dirs "/desktop/gnome/keybindings"
On my machine, this returns 1 entry: /desktop/gnome/keybindings/custom0 We can dig deeper by executing:
gconftool-2 --all-entries "/desktop/gnome/keybindings/custom0"
name = Launch Terminal
action = x-terminal-emulator
binding = <Control><Alt>t
We can see that by default there is only 1 keybinding that launches a terminal. Now we can create our own with the following commands:
gconftool-2 --set "/desktop/gnome/keybindings/custom1/name" --type string "Launch Switchboard" gconftool-2 --set "/desktop/gnome/keybindings/custom1/action" --type string "switchboard" gconftool-2 --set "/desktop/gnome/keybindings/custom1/binding" --type string "<Control><Alt><Shift>s"
Each keybinding needs it’s own folder. In this case, I used “custom1” since “custom0” was already in use. The rest should be pretty self-explanatory: give it a name, an action (command or script to run) and the keybinding you’d like to use.