I am currently talking to ConsoleKit with GDBus. I used the ConsoleKit2 XML files and gdbus-codegen
to generate the code. Everything is working fine. But how can I check if an object exists? For example I want to see if there is a /org/freedesktop/ConsoleKit/Session2
(just an example, I know I could enumerate all Sessions in the Seat object).
I tried using the org.freedesktop.DBus.Peer.Ping
function, but that will return
dbus-send --system --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.DBus /org/freedesktop/ConsoleKit/Seat1 org.freedesktop.DBus.Peer.Ping
Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.168" (uid=1000 pid=18279 comm="dbus-send --system --print-reply --reply-timeout=2") interface="org.freedesktop.DBus.Peer" member="Ping" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)