You are not logged in.
I am trying to start MPD on boot as user. Unfortunately every time I reboot I need to chmod /run/mpd because I get this error as systemd starts mpd with the --user flag
fatal_error: Failed to create pid file "/run/mpd/mpd.pid": Permission denied arch linux site:bbs.archlinux.org
I am part of the mpd group.
The command I used to run as user was
systemctl --user enable mpd
systemctl --user start mpd
After I manually change the permissions to 770, I can run mpd this way, but until then I will continue to get this error. It would be nice if I didn't have to manually intervene every time I reboot.
Last edited by Shelbster (2018-07-30 13:09:57)
Offline
If you are running mpd as --user, create all of your directories under $HOME.
Offline
Does that include the mpd folder in /run? I already have my mpd.conf in ~/.config/mpd. I can play mpd on ncmpcpp and my music plays fine, but before I can get mpd up, I have to manually chmod the mpd folder in /run. I don't understand why it doesn't automatically work. Obviously I can make a script to automatically run the commands to chmod and then start mpd with the - - user flag, but I want to avoid work that I thought would be unnecessary as I thought systemd would take care of it with the - - user flag.
Offline
Just put the pid file in your home directory:
pid_file "/home/shelbster/.config/mpd/pid"
Offline
Or simply remove the pid file setting and let systemd handle this.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Or simply remove the pid file setting and let systemd handle this.
I actually incorrectly assumed that this was already going on, but I guess I was wrong. Commenting out the pid_file setting fixed my problem
Just put the pid file in your home directory:
pid_file "/home/shelbster/.config/mpd/pid"
I now understand what you mean. I was too dumb to realize that the pid_file setting was what was sending it to /run/mpd, is there a reason why this would be a better solution than just removing the pid_file setting?
Offline
No, you just seemed keen on declaring it in your config.
Offline