Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is it possible to run xmms2 stop when I lock the screen with Ctrl+Alt+L?

share|improve this question
up vote 6 down vote accepted

Should be.

The desktop-agnostic way is:

  • install xbindkeys
  • create a script that runs your "xmms" command plus "xscreensaver -l" or "kdescreensaver --lock"
  • create a ~/.xbindkeysrc
  • make xbindkeys run at startup

Assuming your script is in /usr/local/bin/lockandstop, ~/.xbindkeysrc should contain:

Control + Alt + l

or perhaps

Mod4 + l

depending on what xmodmap prints.

But maybe the KDE Control Panel offers an easier way under the keyboard shortcuts section.

share|improve this answer
Sounds like a good solution. I just can't find kdescreensaver. Is that the correct command for KDE 4.5? – Aaron Digulla Jan 12 '11 at 11:28
Found a solution via DBus: – Aaron Digulla Jan 12 '11 at 11:34

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.