'What every desktop needs'

Posted on Sun 27 January 2019 in desktop-config

Desktop Configuration

The big two, err three... maybe four

It seems every tutorial, recipe or 'how to' for building a NetBSD desktop (or any BSD deskop for that matter) always include at least two services. The two services included in every desktop build are dbus and hal. The other one often included is famd and from time to time you'll see avahi (avahidaemon for NetBSD) thrown in for good measure.

About dbus


D-Bus is an Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism specifically designed for efficient and easy-to-use communication between processes running on the same machine.

There are two primary use-cases for which D-Bus is designed: As a "system bus" for communicating between system applications and user sessions As a "session bus" for exhanging data between applications in a desktop environments

Note that one of the other things dbus does is start services up; Another thing dbus does is serve as an RPC library.

For example, GNOME and KDE rely heavily on dbus for sending notifications around. While dbus itself is a more or less terrible piece of software that completely fails to match the traditional Unix model (rather than doing one thing well, it does several things at once, pretty much all badly) it is used by GNOME and KDE because there are things a desktop needs to do that require sending messages around. We need a transport for such messages; not a reimplementation of dbus, but a solid and well-conceived way of sending notices around among running processes.

reference: Desktop infrastructure