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 there a headphone daemon for Linux like there is for maemo? It is really convenient that whenever you unplug your headphones, the media player automatically stops playing.

share|improve this question
It seems unlikely that would you describe would actually exist - largely because of the fact that the kernel probably wouldn't need to know itself. It'd be a major hack, so I'd be surprised if you find such a thing. Don't let it stop your trying, though. – new123456 Mar 30 '11 at 0:18
Maybe a simple program that get list of devices from PulseAudio, and checks if a new device with type of headphone is connected, do the job. But how to getting list of PulseAudio devices (with their types) is the point. – saeedgnu Jun 11 '11 at 13:36

the hda driver, covers most of the new HD sound cards now has a way to detect plug changes. So if you did have a newer sound card, an input event happens when ever you change headphones. An input event could be mapped to a virtual keypress, such as mute. With that, just map the keypress to "MUTE" or one of the other multi-media keys.

share|improve this answer
Ok, I will have to read up on that. Thanks for the info. – Walter White Jul 18 '11 at 12:54

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.