So far, DBus has two types of busses: the session and the system bus.

The session bus is used by most of your desktop applications.

The system bus is used e.g. by Hal signalling that new hardware was added, or by NetworkManager for network connectivity changes. The system bus is protected via a security policy.

Problems arise now when you need to locate your session DBus from a different session. For example, from a cron job.

There is a DBus application called “notification daemon” which can display popup baloons. This is useful for signaling yourself e.g. the completion of a long-running computation or just about anything you want. But it’s using the session bus, so you can’t reach it from outside of your current session.

A year ago, I wrote a hack for this, which will locate your current Gnome session, read the environment variable to find the session bus and then send a message to the sessions notification-daemon.

This is an ugly hack, however yesterday and today people asked on #dbus precisely how to do this. It seems to be a common question.

Maybe DBus should be extended by a “user” DBus, and applications such as music players or the notification daemon should actually listen on that bus (as well).

Maybe it could also be made possible to (securely) locate your session DBus via the system bus, I don’t know how detailed the security policies of the system DBus are.