Products › lamco-dbus-tools › Interfaces

org.freedesktop.DBus: The bus driver's methods, recorded

org.freedesktop.DBus is the D-Bus bus driver, and lamco-dbus-tools records every RequestName, GetNameOwner and StartServiceByName answer it gives on a bus.

D-Bus interface org.freedesktop.DBus

org.freedesktop.DBus is the interface of the bus itself. Every program on a bus talks to it first: It says hello, takes a name, asks who owns another, and asks the bus to start a service. The bus answers as the name org.freedesktop.DBus at the path /org/freedesktop/DBus. Anyone whose service never appears, or whose call fails before reaching a service, has met it. lamco-dbus-tools asks the driver what the bus is and who's on it, records every driver call that crosses a recording, and drives the name and start methods on purpose.

What it is

The D-Bus specification calls the bus's own interface the message bus interface. Its methods fall into a few groups:

  • Joining and names. Hello gives a new connection its unique name, such as :1.42. RequestName takes a well-known name with flags (DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1, DBUS_NAME_FLAG_REPLACE_EXISTING 0x2, DBUS_NAME_FLAG_DO_NOT_QUEUE 0x4) and answers 1 (primary owner), 2 (in queue), 3 (exists) or 4 (already owner). ReleaseName gives one up. ListQueuedOwners lists who's waiting for a name.
  • Asking. ListNames, ListActivatableNames, NameHasOwner, GetNameOwner and GetId. GetNameOwner on a name nobody owns returns an error rather than an empty string.
  • Starting. StartServiceByName asks the bus to start whatever a service file provides for a name, and answers 1 when it started it or 2 when a connection already owned the name. A plain call to an unowned name does the same unless the caller set the flag that forbids starting a service.
  • Who's behind a connection. GetConnectionCredentials and the older GetConnectionUnixUser and GetConnectionUnixProcessID, which have a page of their own.
  • Signals. NameOwnerChanged goes to anyone who listens for it, and NameAcquired and NameLost go to the connection concerned.

The read-only properties Features and Interfaces say what the bus offers beyond the core, such as SystemdActivation or SELinux filtering. Here the two implementations differ in ways the toolkit records: Asked for its own credentials, dbus-daemon gives its own process and dbus-broker gives its launcher's, dbus-broker-launch. dbus-broker lists one feature and leaves out an interface it does implement. A call to a name nothing owns and nothing can start comes back with a different error name on each.

Errors you'll meet

  • org.freedesktop.DBus.Error.ServiceUnknown: No connection owns the name and no service file provides it. GLib prints it as Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown.
  • org.freedesktop.DBus.Error.NameHasNoOwner: GetNameOwner asked about a name nobody owns.
  • org.freedesktop.DBus.Error.AccessDenied: The bus's policy refused the call. On dbus-daemon the text starts "Rejected send message, 1 matched rules".
  • org.freedesktop.DBus.Error.NoReply: The bus answered for a service that never did. One recorded text is "Message recipient disconnected from message bus without replying".
  • org.freedesktop.DBus.Error.Failed: The general error, used where no more specific name applies.
  • org.freedesktop.DBus.Error.AuthFailed: Connecting failed at authentication, before any driver call.

How lamco-dbus-tools reads it

dbussee bus asks GetId, the names the bus can start, its features and interfaces, and its own credentials, and records each answer. dbussee names asks ListNames, then GetNameOwner and ListQueuedOwners for each well-known name. Every message dbussee sends goes to the bus itself with the flag that forbids starting a service. dbusdo start calls StartServiceByName and times it to the bus's answer and to the name having an owner. dbusdo own calls RequestName without queueing, holds the name and calls ReleaseName. dbustell names gives who held each name and when, and dbustell activation gives each service start.

dbussee bus --bus system                       # which program is the bus, and what it says of itself
dbussee names --out names.json                 # every name, its owner and who's queued for it
dbusdo start org.freedesktop.Notifications     # StartServiceByName, timed to the name having an owner
dbusdo own com.example.Test 5                  # RequestName, hold the name 5 seconds, ReleaseName
dbussee record --all --duration 30 --out rec.json   # every driver call and NameOwnerChanged in a span
dbustell names rec.json                        # who held each name and when, and which were lost
dbustell activation rec.json                   # each start: Requested, started, name taken, or why it failed

Where it has been run

The README's run record lists dbussee check, which asks the driver everything above, on the session and system buses of Debian 13 with Xfce (dbus-daemon 1.16.2, 42 and 23 well-known names), Fedora 45 with GNOME (dbus-broker 37, 76 and 31), KDE neon with Plasma (dbus-daemon 1.14.10, 11 and 20, a minute after boot) and Ubuntu 24.04 with Sway (dbus-daemon 1.14.10, 9 and 22), all on 2026-11-28. Service starts were run on private buses with dbus-daemon 1.16.2 and dbus-broker 37 on 2026-11-29 and 2026-11-30, a service that exits 3 reported with dbus-daemon's reason and the service manager's. dbus-daemon releases other than 1.14.10 and 1.16.2, and dbus-broker releases other than 37, aren't recorded either way.

Findings

  • BUS-001: No bus answered.
  • BUS-002: Which program is the bus could not be told.
  • NAME-002: A name has connections waiting to take it.
  • NAME-003: A name changed hands.
  • NAME-004: A name was lost and not retaken.
  • ACT-003: A call asked for a name nothing provides.
  • CALL-004: The bus refused or couldn't deliver calls.

Related