Run custom shell scripts on key press
I have created a shell script for a custom action which is working fine. I want to run this .sh file (mon.sh
) on pressing Alt+F15
.
I have done the following:
In gconf-editor, under apps>metacity>keybinding_commands
, edited command_1
with value
"/home/administrator/My Scripts/mon.sh"
(tried without quotes also)
under apps>metacity>global_keybindings
, edited run_command_1
with value
<Alt>F15
But the script is not getting executed when pressing Alt+F15
What is that I am missing?
I have no idea if you are using the right gconf-keys, but you can configure this via gui:
If you are using Ubuntu without desktopeffects metacity is your windowmanager, then you should use System ▸ Preferences ▸ Keyboard Shortcuts
to add your command and set the keybinding.
If desktopeffects are activated, you are using compiz windowmanager.
Install compizconfig-settings-manager , run it and enter your script in the Commands
preferences.