How to default to headphones on plugging them in?

Ubuntu 17.10 (default Gnome3 DE). On plugging in headphones there's a popup for "Select Audio Device" with the options of Headphones, Headset or Microphone. How do I remove this and default to Headphones on plugging in anything?


Solution 1:

The popup can be disabled using this extension:

https://extensions.gnome.org/extension/1482/remove-audio-device-selection-dialog/

It's working for me on GNOME Shell 3.38.1