how to Start a pulseaudio application as a daemon with systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
  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[1]: Started FooBar.
mai 08 17:29:02 pulseaudio[25472]: [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[1]: foobar.service: Main process exited,
code=exited, status=1/FAILURE
mai 08 17:29:02 systemd[1]: foobar.service: Unit entered failed state.
mai 08 17:29:02 systemd[1]: 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?

Best regards
Christophe



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux