Products › lamco-dbus-tools › Docs
Find who owns a D-Bus name, with its process and unit
Find who owns a D-Bus name: dbussee names lists each well-known name with its owner's unique name, process, user and systemd unit, and starts nothing.
Describes version 0.4.1.
What's needed
dbussee. No privilege. Layer 1: The bus is asked about itself, and no service is started.
List every name
$ dbussee names
NAME OWNER PID UID PROCESS UNIT
ca.desrt.dconf :1.38 1762 1000 dconf-service dconf.service
org.freedesktop.DBus the bus - - - -
org.freedesktop.Notifications :1.42 1926 1000 xfce4-notifyd xfce4-notifyd.service
org.freedesktop.portal.Desktop :1.30 1690 1000 xdg-desktop-por xdg-desktop-portal.service
...
42 well-known names. 55 connections, and this tool's own (:1.908).
| Column | From |
|---|---|
OWNER |
The unique name of the connection that owns the name, as the bus says |
PID, UID |
The bus's credentials for that connection |
PROCESS |
The kernel's short name for the process, which it cuts at 15 characters |
UNIT |
The last part of the process's control group: The systemd unit or scope it runs in |
A name with connections queued behind its owner shows them after the row, as (waiting: ...), and
dbustell health reports it as finding NAME-002.
On the system bus
$ dbussee names --bus system
org.freedesktop.NetworkManager :1.14 775 0 NetworkManager NetworkManager.service
org.freedesktop.PolicyKit1 :1.5 718 988 polkitd polkit.service
org.freedesktop.login1 :1.2 722 0 systemd-logind systemd-logind.service
org.freedesktop.systemd1 :1.9 1 0 systemd init.scope
One name, from a capture
dbussee names --json --out names.json
The capture's bus-names records hold every name with its owner and queue, and every connection with
its credentials. The capture format describes them.
What it doesn't do
- It doesn't start anything. A name that can be started and isn't running is listed by
dbussee busamong the names that can be started, and isn't in this table. - It doesn't ask the service. Everything here comes from the bus and from
/proc. - It doesn't keep watching. It's a reading of one moment. To see names change over time, record the bus, and
dbustell namesgives who held each name and when.