From 195a2f24ea87d642c654ad6e06f3fede4fb66c64 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Fri, 25 Sep 2015 19:27:29 +0200 Subject: [PATCH] [startkde] 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. --- 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 b034b96..f5748dc 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 d8ed68e..17f5881 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 -- 2.4.6