how do i make a command that executes a program when a custom hotkey is pressed? Are there any good tutorials on how the command / terminal system works in ubuntu? I want to know how (using the terminal) I can run libreoffice or any other program for that matter. Thank you very much for any info you can assist me with. lol sorry if these are such noob questions.


On the Keyboard settings windows (super+A, then "keyboard"), click the "Shortcuts" tab, and on the list on the left will be an option for "Custom Shortcuts".

Press the + button, then give your shortcut a name and the program you want run.

It will default to "Disabled", but click on that and then press your keyboard combination you want, and it will become associated with your program.

| improve this answer | |

There are two ways you can accomplish this task: The first way it GUI based, using:

Open Applications > System Tools > Configuration Editor
Then apps > metacity > global_keybindings in the tree view

This should enable you to modify your key values as long as you stay within the acceptable syntax.

The alternate way to edit your keybindings is by directly editing the gconf.xml files:

$HOME/.gconf/apps/metacity/gloabl-keybindings/%gconf.xml $HOME/.gconf/apps/metacity/keybinding_commands/%gconf.xml

You can find more information at http://gnome-hacks.jodrell.net/hacks.html?id=14

| improve this answer | |

I admit it can get a bit thick to get through, but check out man xmodmap for a way to define any key binding.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.