System and Session Bus

Milosz Derezynski internalerror at
Sun Mar 19 11:46:18 PST 2006

On 3/19/06, Oliver Frommel <ofrommel at> wrote:

- What is the point in having a separate session bus when
> a system bus is already running?

The system bus is there to provide coordination between system-wide services
that are independent
of individual users and their apps running, while the session bus is there
for "desktop communication" primarily,
that is, to provide coordination and communication between apps that an
individual user would run (as opposed
to apps/services that the "system would run").

Does the session bus
> require not authentication at all?

(Someone else might be better in answering this point)
I think there is no authentication apart that only the user in question
running the particular session
bus has the session bus address in his environment and therefore only he can
use/access the bus/daemon.

- Is it possible to connect both busses? If yes, how?

You request a connection to either the session or system bus, like this:

DbusConnection *connection;
DBusError error;

dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);


connection = dbus_bus_get (DBUS_BUS_SESSION, &error);

- How is the namespace policy in that connection. For
> instance could I have the same service names, object
> paths etc on both busses, e.g. org.freedesktop.Hal?

Yeah you could although with your practical example it's sort of pointless
(HAL as a user/session service is kinda pointless).

- Is it possible to create new services without
> .service files? How about objects and interfaces?

Yes you can make an app provide a service/interface without a service
file, it's just that the activation/discovery mechanism will not work
without a service file;
this means that when something wants to call some method on that interface,
will not know how to launch the application/binary that provides this
interface and
hence you'll get an error message that there was no service file found for
this interface.

Once you start that app in question manually though the interface is present
as if had been started trough DBus itself.

Thanks for your help
> Oliver
> --
> Linux New Media AG
> Süskindstraße 4
> D-81929 München
> Tel: +49 (89) 99 34 11 42
> Fax: +49 (89) 99 34 11 99
> _______________________________________________
> dbus mailing list
> dbus at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list