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.


Now read this

Secret Cabal meetings

I run a biweekly meetup for the staff+ engineers in my local organisation. A couple different folks asked about whether meetings like these have been worthwhile and how you might go about setting one up, so here is my approach. YMMV.... Continue →