dbus

D-Bus (Desktop Bus) is an inter-process communication (IPC) system that allows applications in Linux to exchange information with each other.

In other words:

D-Bus is a "internal chat channel" between software, services, operating systems and desktop environments (GNOME, KDE…).

Real-life examples:

Scenario Which applications communicate via D-Bus?
When you plug in a USB File manager receives notifications from udev
When you adjust the volume via the media button PulseAudio/pipewire controls the volume
When you open GNOME Settings to turn off Bluetooth GNOME sends a command to the bluetoothd service
When IBus sends input to an application IBus transmits Vietnamese typing data via D-Bus
When systemd sends low battery notification systemd-logind → notification displayer

D-Bus structure consists of 2 parts:

1. System Bus

→ Communication between system and applications (e.g. udev, NetworkManager)

2. Session Bus

→ Communication between user applications (e.g. IBus, notifications, settings…)

Command to check if D-Bus is running:

# Check current session bus ID
echo $DBUS_SESSION_BUS_ADDRESS

# Scan for running services via D-Bus
busctl --user

In Snap:

  • Snap apps need to connect to D-Bus (usually session bus) to communicate with input methods (IBus), media keys, etc.
  • This is managed through plugs: dbus, dbus-daemon, dbus-session,...

Conclusion:

  • D-Bus is the “backbone” that helps Linux software talk to each other
  • IBus, Bluetooth, Media Control, Notification,... all depend on D-Bus
  • A Snap app lacking D-Bus access will not type Vietnamese, not receive media signals, etc.