From 90081cb0483ffc3ad46af3b99de171ed38716ac0 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Fri, 25 Sep 2015 19:27:29 +0200 Subject: [PATCH] Use dbus-update-activation-environment The difference to ksyncdbusenv is that d-u-a-e can update systemd's environment, too. This is only important if a userspace (dbus-daemon) bus is used and service files make use of SystemdService to have dbus-daemon tell systemd to start the service. In the kernel bus (kdbus) case, systemd's environment gets updated when org.freedesktop.dbus.UpdateActivationEnvironment is called. REVIEW: 125768 --- startkde/startkde.cmake | 6 +++++- startkde/startplasmacompositor.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake index 9b8d1d7c2..cd1c40e29 100644 --- a/startkde/startkde.cmake +++ b/startkde/startkde.cmake @@ -343,7 +343,11 @@ if test -n "$PAM_KWALLET5_LOGIN" ; then fi # At this point all environment variables are set, let's send it to the DBus session server to update the activation environment -@CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv +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 'startkde: Could not sync environment to dbus.' 1>&2 diff --git a/startkde/startplasmacompositor.cmake b/startkde/startplasmacompositor.cmake index d8ed68e58..17f5881c7 100644 --- a/startkde/startplasmacompositor.cmake +++ b/startkde/startplasmacompositor.cmake @@ -212,7 +212,11 @@ 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 -@CMAKE_INSTALL_FULL_LIBEXECDIR@/ksyncdbusenv +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 'startplasmacompositor: Could not sync environment to dbus.' 1>&2