If you have a laptop with typical feeble speakers, and a usb audio, then you might like to hear sound through the USB sound device when you have your external sound device connected.
Simply right-click the panel’s loudspeaker icon > Sound Preferences > Output and click on the radio button for your external device. Every time!
You can automate this by editing /etc/pulse/default.da but there is a better way:
In your home directory, create - if necessary - ~/.config/pulse/default.pa containing:
.include /etc/pulse/default.pa
load-module module-switch-on-connect
Then either reboot or run pulseaudio -k && pulseaudio --start
to enable.
Ought to be the default action really … [ Source: ]