Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I set a global shortcut in KDE (4.4) to run a bash script?

share|improve this question
up vote 3 down vote accepted

First make sure that your script is executable, e.g. like this

chmod +x ~/scripts/myscript.sh

Then create the shortcut using the tool which can be accessed by System Settings > Input Actions. Do a right click in the left pane where existing shortcuts are listed and say New Global Shortcut > Command/URL. Set the name to something sensible, choose your desired shortcut, set the command to your script, e.g. ~/scripts/myscript.sh and tick the Enabled box. If you put your script in a folder in path, (following common conventions one would use /usr/local/bin) you can skip the path in the command and just write myscript.sh.

share|improve this answer
I can not find input actions (using debian jessie, kde 4.14.2) – richard Sep 6 '15 at 20:53
In Wheezy and Jessie it seems to be: System Settings →shortcuts and gestures →Custom shortcuts » edit →new →global shortcuts → command/url (maybe for all other systems using newer KDE). Why they hid it?, We may never know. (I just realised that I have just answered my own comment.) – richard Sep 7 '15 at 21:13

Your Answer


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.