startkde: selectively export variables to the D-Bus activation environment

otherwise the variables may persist trough the Katana session (e.g. if
D-Bus was not launched by `startkde`) and affect other desktop environments
and X11 sessions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-20 18:28:27 +03:00
parent 31f2eb9b81
commit 8741d1a7ec

View file

@ -129,7 +129,8 @@ XDG_CURRENT_DESKTOP=KDE
export XDG_CURRENT_DESKTOP
# For session services that require X11, check for XDG_CURRENT_DESKTOP, etc.
dbus-update-activation-environment --all
dbus-update-activation-environment DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP \
KDE_FULL_SESSION KDE_SESSION_VERSION KDE_SESSION_UID
# Start kcminit_startup
kcminit_startup
@ -161,4 +162,7 @@ unset KDE_SESSION_VERSION
xprop -root -remove KDE_SESSION_VERSION
unset KDE_SESSION_UID
dbus-update-activation-environment XDG_CURRENT_DESKTOP="" \
KDE_FULL_SESSION="" KDE_SESSION_VERSION="" KDE_SESSION_UID=""
echo 'startkde: Done.' 1>&2