5 ms·
Doing it like that is sadly the most compatible (and easiest) way to open a privileged port (below 1024)
by kirab 9y ago
Doing it like that is sadly the most compatible (and easiest) way to open a privileged port (below 1024)
- majewsky 9y agoMPD runs on 6600 by default, so that shouldn't be a problem. I run it on my homeserver under a separate audio user, who's also in the pulse group to use PulseAudio on the attached speakers.
- pdimitar 9y agoIf you write a small step-by-step on that scenario, you'd bne making quite a few people happy, me included.
- DSMan195276 9y agoRunning 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.
- bblough 9y agoMy 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.
- DSMan195276 9y agoYeah, 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.
- majewsky 9y agoHere's the recipe: https://github.com/majewsky/system-configuration/blob/master/hologram-damogran-audio.pkg.toml https://github.com/majewsky/system-configuration/blob/master... Everything should be pretty self a explanatory. The "holoscript" part gets executed by my configuration management tool, but it basically means that the two LoadModule lines are appended to the stock /etc/pulse/default.pa Also, if you have a firewall, open port 6600 to LAN if desired.