[pulseaudio-discuss] Service File for running in system mode
tanuk at iki.fi
Tue Oct 4 11:22:32 UTC 2016
On Thu, 2016-09-29 at 17:52 +0200, Florian Lindner wrote:
> I know that running pulseaudio in system mode is discouraged, but there
> are valid use cases.
> Is there an official upstream systemd service file for that? I found a
> couple of variants on the internet, but I would prefer to use an
> recommeded one?
No, there's no official upstream file. I think it would be good to have
one, though. Would you like to contribute a patch?
> - Is is Type simple or notify?
> - Should --disallow-exit be set?
Yes, I think that's a good idea.
> - I have found service files that use "After=sound.target dbus.service"
> as well as "Before=sound.target". What is correct?
To me it seems most sensible to have pulseaudio as a part of
sound.target, so using WantedBy=sound.target would make the most sense
For dealing with the dbus dependency, I think Wants=dbus.socket and
After=dbus.socket would be appropriate.
My advice is not based on trying to actually run pulseaudio in the
system mode as a systemd service.
> - What is it WantedBy?
If you use it in the pulseaudio service file, it makes pulseaudio a
dependency for something else. See here for details:
More information about the pulseaudio-discuss