Autoswitch connector when headphones plugged in
Hi! I'm working with Fedora 16 on a Dell XPS-15 L502X. When I plug-in headphone using the analog output port, I hear sound both from the laptop speakers and from the headphone. In order to exclude sound from the laptop I have to go to Sound Settings, Output tab, and change 'connector' from 'Analog Speakers' to 'Analog Output'. Is there a way to do this automatically when I plug in headphones, or at least a terminal command to do that?
Thanks