Accessing Session Bus through the superuser
marcel at holtmann.org
Mon Mar 17 09:09:13 PDT 2008
>> That's not a good practice. Instead, let the user connect to the
>> bus and receive the notifications there. Do not push messages into
>> session bus.
> Right. Now the fact that a lot of people want the functionality to
> broadcast notifications to the logged in session makes me think we
> should probably add it to the system. But that's not a topic for this
the BlueZ daemon uses the concept of an agent. So in running within
user context it registers an object path and then calls a register
function on the system daemon to tell it where the user agent has its
path. That is enough to integrate a nice 1:1 communication via a
system daemon and a user space UI for input etc.
Check the BlueZ API documentation. It is one of the really nice
advanced things you can do with D-Bus. Including the way of monitoring
if an agent dies unexpectedly.
More information about the dbus