From d813529ec0d7c2fe383b1f80af18aff68cd28bc6 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 18 Jun 2020 14:37:13 +0200 Subject: The Plasma X11 session needs to be started through dbus-run-session The Plasma Wayland session script already does this. Without it, you will notice that DBUS_SESSION_BUS_ADDRESS is not getting set and for instance Chromium can no longer connect to KWallet via D-Bus. --- kde/post-install/plasma-workspace.post-install | 13 +++++++++++-- .../plasma-workspace/xsession/plasma-safe.desktop | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'kde/post-install') diff --git a/kde/post-install/plasma-workspace.post-install b/kde/post-install/plasma-workspace.post-install index e0dbe78..437a897 100644 --- a/kde/post-install/plasma-workspace.post-install +++ b/kde/post-install/plasma-workspace.post-install @@ -1,11 +1,13 @@ -# Use ck-launch-session in runlevel 3, +# Use ck-launch-session in runlevel 3 if that is available, # to start and attach a ConsoleKit session to the X session: mkdir -p $PKG/etc/X11/xinit cat $CWD/post-install/plasma-workspace/xinit/xinitrc.plasma \ | sed -e "s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/g" \ > $PKG/etc/X11/xinit/xinitrc.plasma chmod 0755 $PKG/etc/X11/xinit/xinitrc.plasma + +# Add a script that launches a Plasma Wayland session from the commandline: mkdir -p $PKG/usr/bin cat $CWD/post-install/plasma-workspace/scripts/startkwayland \ | sed -e "s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/g" \ @@ -25,7 +27,7 @@ rmdir $PKG/usr/lib$LIBDIRSUFFIX/qt5/plugins/plugins # Move the polkit dbus configuration files to the proper place: mkdir -p $PKG/etc -mv $PKG//etc/kde/dbus-1 $PKG/etc/ +mv $PKG/etc/kde/dbus-1 $PKG/etc/ if [ "$SLACKPAM" == "no" ]; then # For shadow, this file needs to be setuid root just like the KDE4 version: @@ -40,3 +42,10 @@ else # Install a PAM file for Plasma5 workspace: install -Dm644 $CWD/post-install/plasma-workspace/pam.d/kde $PKG/etc/pam.d/kde fi + +if [ "$SLKELOGIND" == "yes" ]; then + # Since elogind does not set DBUS_SESSION_BUS_ADDRESS we need to start + # Plasma X11 session through dbus-run-session like Wayland is launched: + sed -i $PKG/usr/share/xsessions/plasma.desktop \ + -e "s,^Exec=/,Exec=dbus-run-session /," +fi diff --git a/kde/post-install/plasma-workspace/xsession/plasma-safe.desktop b/kde/post-install/plasma-workspace/xsession/plasma-safe.desktop index f82cda4..e166414 100644 --- a/kde/post-install/plasma-workspace/xsession/plasma-safe.desktop +++ b/kde/post-install/plasma-workspace/xsession/plasma-safe.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Encoding=UTF-8 Type=XSession -Exec=/usr/bin/startplasma-x11 --failsafe +Exec=dbus-run-session /usr/bin/startplasma-x11 --failsafe TryExec=/usr/bin/startplasma-x11 DesktopNames=KDE Name=Plasma (Failsafe) -- cgit v1.2.3