Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [DONE] [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (Read 2122 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[DONE] [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed`

Currently, the beginning of /usr/share/xsessions/plasma.desktop are:

Code: [Select]
[Desktop Entry]
Type=XSession
Exec=/usr/bin/startplasma-x11
TryExec=/usr/bin/startplasma-x11

This causes some subtle issues:

1. GTK applications launched through global shortcuts can't access DBus (for example, Chromium is unable to launch the file manager if one clicks "Show download folder"). Qt apps seem unnaffected, though.
2. Both GTK and Qt applications launched through KRunner will have D-Bus access, but will have the / (root) as working directory (for example, launch Konsole through a global shortcut, PWD is ~; launch through KRunner, PWD is /)
3. Comparing the output of `export` ran on a Konsole launched through global shortcuts, and on a Konsole launched through KRunner, one notices the variable `DBUS_SESSION_BUS_ADDRESS` is missing on the first (presumably causing issue #1).

Once we change the Exec line of /usr/share/xsessions/plasma.desktop to

Code: [Select]
Exec=/usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-x11

These issues go away (global shortcut GTK apps work as expected, KRunner applications have ~ as workdir). Plasma Wayland is already wrapped with `plasma-dbus-run-session-if-needed`, and doesn't have these specific issues. I haven't tested KDE Openbox, though.

EDIT: KDE/Openbox has the same issue, but can fixed in the same way (wrap with `/usr/lib/plasma-dbus-run-session-if-needed`)

Would the package maintainers mind making this change to the plasma-workspace package?

Re: [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (too)

Reply #1
I thought .desktop files were upstream from the source code.

Re: [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (too)

Reply #2
That's correct, upstream has only /usr/bin/startplasma-x11 in the Exec= line.

Well, guess I'll keep this as a local workaround/pacman hook, since I don't have a systemd distro to compare and narrow down a more precise culprit.

Re: [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (too)

Reply #3
definitely! i know about this problem/issue... i have same issue with kwrite, even if DBUS_SESSION_BUS_ADDRESS is defined in env.
but
Code: [Select]
Exec=/usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-x11
works not for me.
What works for me is
Code: [Select]
Exec=dbus-run-session /usr/bin/startplasma-x11
which i will add to plasma-workspace (see this report https://forum.artixlinux.org/index.php/topic,1125.15.html) similar problem has void linux too https://github.com/void-linux/void-packages/issues/21766

Re: [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (too)

Reply #4
fixed in plasma-workspace-5.21.3-1.1, please test and confirm, if works...
thanks for report!!

 

Re: [Request] Wrap KDE Plasma X11 with `plasma-dbus-run-session-if-needed` (too)

Reply #5
Just tested, confirmed working!