[pulseaudio-discuss] how to Start a pulseaudio application as a daemon with systemd
christophe.lohr at cegetel.net
Tue May 8 17:50:54 UTC 2018
I'm coding a small application which use pulseaudio.
This application works well when I test it inside my user session (x11,
dbus, xfce, etc.)
Now I would like to start this application as a deamon with systemd (I
wrote a simple foobar.service script according to systemd tutorials).
Unfortunately this fails with messages:
mai 08 17:29:02 systemd: Started FooBar.
mai 08 17:29:02 pulseaudio: [pulseaudio] server-lookup.c: Unable
to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to
autolaunch a dbus-daemon without a $DISPLAY for X11
mai 08 17:29:02 systemd: foobar.service: Main process exited,
mai 08 17:29:02 systemd: foobar.service: Unit entered failed state.
mai 08 17:29:02 systemd: foobar.service: Failed with result 'exit-code'.
If I understand well, the pulseaudio client library doesn't find how to
reach the pulseaudio server, isn't it?
How to fix this?
Shall I start a pulseaudio server dedicated to the foobar user (the one
who start my foobar daemon)?
Or a "system" pulseaudio server?
More information about the pulseaudio-discuss