]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
xorg/50-systemd-user: import XAUTHORITY only if set
authorDmytro Bagrii <dimich.dmb@gmail.com>
Thu, 19 Feb 2026 00:27:47 +0000 (02:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 Feb 2026 07:15:33 +0000 (08:15 +0100)
The warning will still be reported if XAUTHORITY is set but not exported.
However, such scenario is unlikely for xinitrc.d scripts environment.

Fixes #40745

Signed-off-by: Dmytro Bagrii <dimich.dmb@gmail.com>
xorg/50-systemd-user.sh

index fb03ecbec05f0cea71ecfbd512259d2a435aa158..41b7c8a3b4d95cc8625e7966da0f9e8b845b930e 100755 (executable)
@@ -8,7 +8,7 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
-systemctl --user import-environment DISPLAY XAUTHORITY
+systemctl --user import-environment DISPLAY ${XAUTHORITY+XAUTHORITY}
 
 if command -v dbus-update-activation-environment >/dev/null 2>&1; then
     dbus-update-activation-environment DISPLAY XAUTHORITY