My setup
System 76 Kudu-Pro laptop with Ubuntu 16.04 LTS that I installed and keep regularly upgraded every few days. I am using Unity as my primary desktop with 12 users I frequently switch among to do specific tasks and for security isolation.
The problem
I start music playing then switch user and the music stops. This even happens if I ssh to localhost, unset the DISPLAY environment variable, become root, and play the music by a command (mplayer) from this session. I first encountered this problem on 14.04 LTS which was the first version I was using Unity and came pre-installed on the laptop. when switch user back to the same user that started playing the music, the music resumes. this also applies to audio played by the browser, such as Youtube videos.
My Question
How can I play music that keeps on playing (in a virtual background?) when I switch user? Also: Is PulseAudio involved in this?
Considerations
If the solution needs root or sudo access, I can do that. If the solution needs some small-scale programming, I can do that in C and/or Python. I have been thinking that one possible workaround is to get a USB audio device and hope this 2nd audio device can be made to work.