Process monitoring using D-Bus server client model

Havoc Pennington hp at pobox.com
Mon Jun 2 22:20:53 PDT 2008


Hi,

On Tue, Jun 3, 2008 at 12:22 AM, João Valverde <backup95 at netcabo.pt> wrote:
> My question now is which bus to use. The system bus is heavily locked down
> security wise and I don't think that's the proper channel for this job.
> Since this is a daemon running under root, and the GUI runs with user
> privileges, I think the correct procedure is to use the user session bus to
> feed the GUI with signals, but how do I connect the daemon (whose session
> bus belongs to the root account?) with the user session bus? The daemon
> should be able to run automatically from init.d. Sorry if this is a pretty
> basic question but I'm pretty stumped.
>

There are many other subsystems with this same basic issue.
NetworkManager, PackageKit, HAL, etc. are all system daemons that have
some kind of UI in the unprivileged user session. This is really what
the system bus was invented for, to have a way to go between the
systemwide security domain and user sessions. Anyway basically both
your daemon and your user GUI connect to the system bus and they talk
through that. The user session bus is for discussions between two apps
that are both inside the user session.

Havoc


More information about the dbus mailing list