user pulseaudio

Michael and I have a home server running spotifyd (which is really a story for another post); each running a user systemd service to keep it up.

This seemed to confuse pulseaudio a little. The default ubuntu configuration runs one pulseaudio service per user, and only the “active user” gets to actually make sounds come out of the speakers. The definition of active user wasn’t entirely obvious; if someone was logged in to a graphical session then they got it, and otherwise it seemed to take turns based on who was actually playing.

Anyway, apparently it’s not recommended to run pulseaudio as a system user, mostly for security reasons, but as an Official Security Person I can clearly ignore all of these and just run it anyway. So, to get it working:

sudo systemctl enable pulseaudio
sudo systemctl start pulseaudio

then for each user that should play music, add that user to the audio and pulse-access groups, then disable their user pulseaudios:

systemctl --user stop pulseaudio
systemctl --user disable pulseaudio # to stop it starting again
systemctl --user restart spotifyd

Now you can even play multiple spotify streams into the same speakers. Which sounds great, by the way.

 
2
Kudos
 
2
Kudos

Now read this

installing the wireless dongle on the pi

After what I can only describe as an epic, xkcd-style battle with wireless drivers on my recently-revived Pi, it finally connects to the network. For my benefit when I inevitably muck it all up and have to reinstall, here are the steps I... Continue →