Dbus is a messaging system used in Linux display managers such as GNOME.

Accessing Dbus[edit | edit source]

Dbus is accessed using a socket whose location is defined as an environment variable named DBUS_SESSION_BUS_ADDRESS. Typically, it will look something like:


This environment variable must be defined in order for Dbus utilities to work properly.

Watching For Messages / Events[edit | edit source]

You can watch the dbus for messages using the dbus-monitor utility. A filter can be passed as an argument. For example, to limit only messages sent by the GNOME SessionManager:

dbus-monitor "type=signal,sender='org.gnome.SessionManager'"

Sending Messages[edit | edit source]

Messages can be sent using dbus call or dbus-send.


gdbus call --session --dest org.gnome.SessionManager \
  --object-path /org/gnome/SessionManager/Presence \
  --method org.gnome.SessionManager.Presence.SetStatus 0

See Also[edit | edit source]

Gnome Presence Key

Gnome Screensaver (doesn't seem to work)