[Pkg-mpd-maintainers] Bug#835502: Bug#835502: mpd: add systemd user unit for autorun with systemd user-session
Сергей Процеров (Sergey Protserov)
protserovsd at gmail.com
Wed Sep 14 15:24:35 UTC 2016
Hello! I have tried what you suggested. mpd unit fails at startup with
debian systemd[742]: Failed at step NAMESPACE spawning /usr/bin/mpd:
Operation not permitted
in journalctl --user
I am using i3-wm which does not launch XDG autostart files. However, as
I know, one can only enable systemd user unit manually, and one can also
easily disable XDG autostart applications using his DE's settings manager.
As for arch's unit, here it is:
https://gist.github.com/anonymous/ad23176c3709ee5dbc36c13bb73ce1b5
It seems to work just fine for me.
Sergey.
12.09.2016 23:03, Florian Schlichting пишет:
> Hi Protserovsd,
>
>> In Archlinux mpd package provides /usr/lib/systemd/user/mpd.service file, which
>> allows mpd to be started by systemd user session (useful for autostart on user
>> login). It would be great if Debian packages' also provided this unit.
>
> this is an interesting suggestion. I don't have much experience with
> user units, but I think it's not too dangerous to experiment a bit. So
> mpd 0.19.19-1 which I'm just uploading to unstable has a user unit,
> slightly adjusted from the system unit (simplified - do you know what
> Arch is using?).
>
> I wonder how that works together with the XDG autostart .desktop file
> that we ship?
>
> Please try it out and send me your suggestions!
>
> Florian
>
> PS:
> Since you seem to be using stable, can you just add the unit file there
> and see if that works well?
> as /usr/lib/systemd/user/mpd.service:
>
> [Unit]
> Description=Music Player Daemon (user unit)
> Documentation=man:mpd(1) man:mpd.conf(5)
> Documentation=file:///usr/share/doc/mpd/user-manual.html
>
> [Service]
> ExecStart=/usr/bin/mpd --no-daemon
>
> # disallow writing to /usr, /bin, /sbin, ...
> ProtectSystem=yes
>
> [Install]
> WantedBy=default.target
>
More information about the Pkg-mpd-maintainers
mailing list