Hacker News new | past | comments | ask | show | jobs | submit login

Running MPD as a separate user is pretty easy, there's lots of ways to do it and MPD doesn't care as long as it has access to your music and can open the socket (Neither of which require root by themselves). The easiest way is to just modify the user in mpd.conf and let mpd change to the user when it starts. But you can also just start it manually as another user, or change user in the init-script/system-service/etc.. mpd doesn't care how you do it.

PulseAudio on the other hand throws a fit. For reasons unknown to me, PulseAudio basically doesn't support running as a system-wide instance, so things get pretty messy if you want sound to come from multiple users (IE. Your user, and your mpd user). If you only ever use one user on your system, I'd recommend just running mpd under that user - I believe that's what I did to get it working on my computer. Of course, if you're not using PulseAudio then this isn't an issue in the first place.




My understanding is that the preferred way to launch PulseAudio is to launch it as part of your X session so it runs as your user. MPD supports launching in the same way. So done this way, everything runs as your user and therefore plays nicely together.

This is the approach I took, and I think it works very well.


Yeah, you could do that. There's not really much difference between launching it with X and just configuring mpd to run as your user, though launching with X might be easier to setup in some cases.

The only problem with that approach is it means that mpd is tied to your X session. I quit or restart X every once in a while and it's nice to have my music keep going during that time. But obviously that's not a use-case everyone cares about since most people don't have a reason to leave X.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: