Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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