systemd: Disable pipewire user services for root

The `access(2)` based multi-user mediation mechanism doesn't quite work
for the root user, which may cause it to conflict with a running
foreground user session. Prevent this by not running the user service at
all for the root user, which nobody should be doing anyway.

(cherry picked from commit 9bc29b4b37)
This commit is contained in:
msizanoen 2025-03-10 20:06:58 +07:00 committed by Robert Mader
parent f81f2f8d38
commit f19fd8a735
2 changed files with 2 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Description=PipeWire Multimedia Service
# After=pipewire.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pipewire.socket
ConditionUser=!root
[Service]
LockPersonality=yes

View file

@ -1,5 +1,6 @@
[Unit]
Description=PipeWire Multimedia System Sockets
ConditionUser=!root
[Socket]
Priority=6