SUMMARY If I make a change to a KAuth helper and then log into the built-from-source session as configured by install-sessions.sh, the helper I just built isn't invoked, instead the distro-installed helper is called. This makes it a bit difficult to develop KAuth helpers. STEPS TO REPRODUCE 1. Make some changes to a KAuth helper (e.g. in plasma-firewall), compile and install using kdesrc-build 2. Log into a session via SDDM selecting the built-from-source session previously installed using install-sessions.sh from plasma-workspace 3. Perform whatever actions invoke the KAuth helper OBSERVED RESULT The stock distro-installed helper is invoked EXPECTED RESULT The helper compiled in step 1 is invoked SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.26.80 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 Graphics Platform: Wayland
Yes, this is a known limitation. It will be fixed by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1715.
*** Bug 476534 has been marked as a duplicate of this bug. ***
In the upstream dbus-daemon session.conf file, `<standard_session_servicedirs />` is placed above all of the `<includedir>session.d</includedir>` type stuff, so the `<servicedir>/opt/kde-dbus-scripts/services</servicedir>` part that is added by `install-sessions.sh` will be below the standard (system and user) directories. This means that for a system that has KDE Plasma installed both through the distro as well as kdesrc-build dbus-daemon will pick the version installed through the distro rather than the one provided by kdesrc-build, as per the documentation (https://dbus.freedesktop.org/doc/dbus-daemon.1.html). So, I wonder if upstream D-Bus could be convinced to change the defaults to also allow the additional config files to add service directories above the standard ones, especially for the session bus given that anything malicious can just drop stuff in ~/.local/share/dbus-1/services without needing any special privileges like what I'm doing already. They do clearly intend for the local config files to be able to override the defaults anyway, so I guess it's possible that they just didn't think of our use case when they wrote those defaults. On the other hand, the default system bus service directories are all under /usr or /lib, which would be protected for immutable systems, so getting upstream to allow us to override those would probably be more of an uphill battle, and if that isn't resolved then we'd still need a proper solution like the linked 1715 MR. Notably the KAuth helpers fall into the system services category (and in fact all but one of the system services I see in my kdesrc-build setup are KAuth stuff). But then again, if just fixing the problem for the session bus/services would be an improvement Jade seems to have another possible solution in the linked MR, which is to run the D-Bus session instance with a special config file that includes but also overrides the system defaults, including the directories problem. I might bring it up with upstream D-Bus at some point, unless someone can point out any glaring problems with that proposal which I missed.
For the session bus, i prefer it to copy `~/kde/usr/share/dbus-1/services` into `$XDG_RUNTIME_DIR/dbus-1/services"` in `startplasma-dev.sh` This has the positive consequence of them getting updated on every login and they aren't affecting any other session of the user. Only caveat is that according to the dbus-daemon manpage, the XDG_RUNTIME_DIR doesn't get monitored for file changes and filenames have to strictly match the well-known bus name. This was not the case for me. But if it's the case, the not-matching files can be renamed and the dbus ReloadConfig can be triggered after copying manually with ``` dbus-send --session --print-reply --type=method_call \ --dest=org.freedesktop.DBus \ / org.freedesktop.DBus.ReloadConfig > /dev/null ```
*** Bug 477863 has been marked as a duplicate of this bug. ***
(In reply to pixelplanetdev from comment #4) > For the session bus, i prefer it to copy `~/kde/usr/share/dbus-1/services` > into `$XDG_RUNTIME_DIR/dbus-1/services"` > in `startplasma-dev.sh` Until we didn't solve it properly, could we document this approach somewhere on the Wiki maybe?