Under XFCE, I had option to set my keyboard media keys to run particular programs or scripts. I understand the options to adjust the Keyboard Shortcuts under Gnome, but how do I change the default programs that the keys use.
For example, I have a script I use that manages my calculator (in this case, galculator). This script not only launches an instance of galculator but makes sure that another instance is not running. So unlike the default manner under Gnome, if one instance is already running, it just brings focus to it). I am not having 15 different calculators to close out in the end.
I have tried looking under gconf and keyboard shortcuts. Any other ideas?
Open Keyboard Shortcuts (
System -> Preferences -> Keyboard Shortcuts
). By default you would see "Launch Calculator" action mapped toXF86Calculator
, click on it and press Backspace to leave it disabled.Click on
Add
button to get "Custom Shortcut" dialog. Enter name as "My Calculator Script" and command as the full path to your script. ClickOK
.You will find this new shortcut at the end of the list. Click on it (you will see shortcut entry against it will change from
Disabled
toNew Shortcut...
).Press the
XF86Calculator
key (the special calculator key on your keyboard)Press
Close
to close this dialog. This should now run your script when you press the calculator key.