daemon: Rely on systemd unit file for X11 plugin initialization

For GNOME X11 sessions, avoid relying on xdg autostart desktop files
to initialize the X11 plugins. This is now handled via a systemd unit
file.

The xdg autostart is still installed, but has been made to instruct
GNOME to skip it with X-GNOME-HiddenUnderSystemd. This is still the
primary way to initialize X11 plugins for other DEs.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/467>
This commit is contained in:
Carlos Garnacho 2020-11-04 11:16:27 +01:00 committed by PulseAudio Marge Bot
parent a155cf8ca5
commit 4868fcf5f3
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,18 @@
[Unit]
Description=Sound Service (X11 Plugins)
Requires=pulseaudio.service
After=pulseaudio.service
ConditionUser=!root
PartOf=gnome-session-x11.target
[Service]
ExecStart=@PA_X11_BINARY@
ExecStop=@PA_X11_BINARY@ stop
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
UMask=0077