Just wondering; how do I bind .sh files to run when I press a particular key combination? (like Alt+S)
You can use the keyboard shortcuts interface to do this. Remember to add the full path.
Just for completeness: If you are using Compiz you can set custom keyboard and mouse shortcuts using CCSM (Compiz Config Settings Manager) and the Commands plugin.
Just put in the name of your sh-script (for example "CustomScript" in the attached screenshot) and give it a custom key binding in the Key Bindings tab. Your script needs to be placed in a directory that is monitored by Ubuntu for this to work. I do place all of my scripts in the
Make sure that your script is executable by applying
Compiz allows to export all settings including shortcuts which is very useful for settings up similar machines.
Another feature which is not found in Keboard Shortcuts is that you can use
To install xbindkeys, and xbindkeys-config (the GUI for xbindkeys)
To create the default config file for xbindkeys
And for your first keybinding, you may find it useful to assign Ctrl+Shift+Alt+X, or whatever you prefer, to
To keep the xbindkeys hotkeys active ever time you start the computer...
Goto System>>Preferences>>Keyboard Shortcuts
It will open a window click add
After clicking add it will show you a window with Name and Command.You can write any name there and in command you should give the full path of the file with bash in-front bash /path/to/the/file.sh
After adding the Name & Command.You can assign the shortcut key.