xorg/50-systemd-user: import XAUTHORITY only if set

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>
This commit is contained in:
Dmytro Bagrii
2026-02-19 08:15:33 +01:00
committed by Lennart Poettering
parent b3a2444ba5
commit 8df975bb67
+1 -1
View File
@@ -8,7 +8,7 @@
# the Free Software Foundation; either version 2.1 of the License, or # the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version. # (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 if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY dbus-update-activation-environment DISPLAY XAUTHORITY