Commit 32932b44 authored by Fabian Vogt's avatar Fabian Vogt

Move calls depending on $DISPLAY from startplasmacompositor to startplasma

Summary:
Xwayland is only available within startplasma, so only call xprop in
startplasma.
Additionally, the environment isn't complete within startplasmacompositor,
as $DISPLAY needs to be exported to the activation environment as well.

BUG: 377122

Test Plan: pinentry-qt works now when started from gpg-agent.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: graesslin, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9597
parent 98f96ac6
......@@ -117,6 +117,18 @@ echo 'startplasma: Starting up...' 1>&2
xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
if which dbus-update-activation-environment >/dev/null 2>/dev/null ; then
dbus-update-activation-environment --systemd --all
else
@CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv
fi
if test $? -ne 0; then
# Startup error
echo 'startplasma: Could not sync environment to dbus.' 1>&2
exit 1
fi
# We set LD_BIND_NOW to increase the efficiency of kdeinit.
# kdeinit unsets this variable before loading applications.
LD_BIND_NOW=true @CMAKE_INSTALL_FULL_LIBEXECDIR_KF5@/start_kdeinit_wrapper --kded +kcminit_startup
......
......@@ -235,7 +235,8 @@ export XDG_CURRENT_DESKTOP
QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORM
# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
# kwin_wayland can possibly also start dbus-activated services which need env variables.
# In that case, the update in startplasma might be too late.
if which dbus-update-activation-environment >/dev/null 2>/dev/null ; then
dbus-update-activation-environment --systemd --all
else
......@@ -252,9 +253,7 @@ fi
echo 'startplasmacompositor: Shutting down...' 1>&2
unset KDE_FULL_SESSION
xprop -root -remove KDE_FULL_SESSION
unset KDE_SESSION_VERSION
xprop -root -remove KDE_SESSION_VERSION
unset KDE_SESSION_UID
echo 'startplasmacompositor: Done.' 1>&2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment