You are not logged in.

#1 2016-04-24 20:02:50

rodaz143
Member
Registered: 2013-07-24
Posts: 95
Website

[SOLVED] MPD can't connect to current user

So after giving up trying to get mpd running as its own user out of /var/lib/mpd/*, I decided to set the user option to  my own user and to use ~/.mpd/*. It works if I just run "mpd" as a command out of the command line, but if I try "systemctl (re)start mpd", I get the error "fatal_error: Failed to set user "rodaz143": Operation not permitted.

Why is it not allowing it to use my user? I could just create a .desktop file and put it in ~/.config/autostart, but that seems kind of hacky.

here is my /etc/mpd.conf

user			"rodaz143"
pid_file		"~/.mpd/mpd.pid"
db_file			"~/.mpd/mpd.db"
state_file		"~/.mpd/mpdstate"
playlist_directory	"~/Playlists"
music_directory		"/media/MyPassport/Music"


audio_output {
	type		"pulse"
	name		"HDMI / DisplayPort"
}

Last edited by rodaz143 (2016-04-28 21:23:45)

Offline

#2 2016-04-24 20:40:27

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] MPD can't connect to current user

Remove the user setting from the config and use the user service (with `systemctl --user`).

Offline

#3 2016-04-24 21:24:40

rodaz143
Member
Registered: 2013-07-24
Posts: 95
Website

Re: [SOLVED] MPD can't connect to current user

Oh right, I forgot about --user, but I didn't know it was required in this case.

Offline

#4 2016-04-25 14:55:16

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] MPD can't connect to current user

pulseaudio is a user process which blocks other users.
So either run mpd and pulse under the same user or allow anonymous access (with paprefs)
for the latter to work you have to add "server "127.0.0.1" to your audio_output block


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

#5 2016-04-28 21:23:32

rodaz143
Member
Registered: 2013-07-24
Posts: 95
Website

Re: [SOLVED] MPD can't connect to current user

Rasi wrote:

pulseaudio is a user process which blocks other users.

That explains why then. It's a lot simpler to have mpd run as myself than to make accommodations for it via pulseaudio's configuration.

Last edited by rodaz143 (2016-04-28 21:24:14)

Offline

Board footer

Powered by FluxBB