Integration / D Bus Interview Questions
What is the difference between the system bus and the session bus?
The system bus is a single, machine-wide bus started at boot, typically running as root, used for services that manage system-level resources shared across all users, such as systemd, NetworkManager, or UPower. Because it handles privileged operations, it's guarded by a strict security policy: most processes can only call the specific methods explicitly allowed for their user or context.
The session bus is scoped to a single logged-in user's session, started when that session begins and torn down when it ends. It's used for desktop-level coordination between applications belonging to that user, such as a notification daemon or a media player exposing playback controls, and its policy is generally more permissive since everything on it belongs to the same user.
A practical implication is that a system service exposing something like "restart this daemon" lives on the system bus and requires policy authorization, while a desktop app exposing "show this notification" lives on the session bus and is freely callable by anything running as that user.
More Related questions...