Making the system dbus aware of a "parallel KF5 prefix"

René J.V. Bertin rjvbertin at gmail.com
Fri Sep 16 10:22:08 UTC 2016


Hi,

I've been building and installing Qt5 and select KF5 applications to /opt/local for use "under" my trusty (sic) old KDE4 desktop. I build with full rpaths so I don't have to fool around with LD_LIBRARY_PATH or ldconfig. My session dbus daemon is perfectly happy to expose the services from /opt/local after I created a session-local.conf as described at

https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Test_plasma#Configure_dbus

but the system dbus doesn't play so nicely.

After creating a system-local.conf and sending a SIGHUP to the system dbus-daemon, I see things like this:

%> qdbus --system org.kde.kcontrol.kcmkwallet5
Error: org.freedesktop.DBus.Error.Spawn.FailedToSetup
Failed to setup environment correctly
Exit 2
%<

Without system-local.conf I just get an error that the service isn't found, and if I move the servivedir and includedir lines from system-local.conf to system.conf things work almost as expected:

%> qdbus --system org.kde.ksysguard.processlisthelper
Error: org.freedesktop.DBus.Error.AccessDenied
Rejected send message, 1 matched rules; type="method_call", sender=":1.502" (uid=505 pid=23410 comm="/opt/local/libexec/qt5/bin/qdbus --system org.kde.") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.kde.ksysguard.processlisthelper" (uid=0 pid=23413 comm="/opt/local/lib/x86_64-linux-gnu/libexec/kauth/ksys")
Exit 2
%<

(note the truncated commands, just a limitation of error messaging?)

However, the processlist helper still doesn't work; trying to use it gives the error 

kf5.kauth: "No such interface 'org.kde.kf5auth' at object path '/'"

%> cat /opt/local/etc/dbus-1/system.d/org.kde.kf5auth.conf    
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
 
<!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
  <policy context="default">
    <allow send_interface="org.kde.kf5auth"/>
    <allow receive_sender="org.kde.kf5auth"/>
    <allow receive_interface="org.kde.kf5auth"/>
  </policy>
 
</busconfig>
%<

Which is almost identical to the org.kde.auth.conf file in /etc/dbus-1/system.d .

What am I missing here? Is that environment error a result of wrong ownership and/or permissions on one of the files or directories involved? AFAICT mine are identical to the system files and directories in that aspect: owned and writable only by root.

I haven't had much luck finding information about the FailedToSetup error, not via Google nor by staring at the dbus source. I did find a few suggestions that I may actually be dealing with a dbus bug?

Thanks,
René


More information about the dbus mailing list