Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Is there a way to start my default music player after connecting the headphones or earphones ?

If there is nothing in the form of a GUI, I don't mind writing a script for it, but I need some starting guidance, which is where do I write the script?

I am connecting the headphones through the 3.5mm jack.

share|improve this question
This is going to be dependent on what hardware you have. First thing to sort out is 'jack detection' (not what it sounds like) which is covered in this related question. – Tom Brossman Jan 2 '13 at 16:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.