gdbus
Interact with D-Bus services
TLDR
List all names on the session bus
List all names on the system bus
Introspect an object to see its interfaces and methods
Call a method on an object with arguments
Emit a signal from an object with arguments
Monitor all messages on the session bus
SYNOPSIS
gdbus [OPTION...] SUBCOMMAND [ARG...]
where SUBCOMMAND is call, emit, introspect, monitor, object-manager, help, or version.
PARAMETERS
--session
Connect to the user session bus (default)
--system
Connect to the systemwide D-Bus instance
--address=<ADDRESS>
Use D-Bus server at custom ADDRESS
--help
Print usage summary
--version
Display GIO/GDBus version information
DESCRIPTION
gdbus is a command-line utility from the GLib library's GIO framework, designed for interacting with D-Bus interprocess communication. It enables introspection of remote D-Bus objects, invocation of methods, emission of signals, monitoring of bus activity, and management of object hierarchies.
Primarily used for debugging, testing, and scripting D-Bus services on Linux systems—especially GNOME environments—gdbus handles complex data via GVariant format, supporting session, system, or custom bus connections. Its human-readable syntax simplifies tasks that would otherwise require programming.
For example, developers can inspect interfaces, call methods with typed arguments, or eavesdrop on signals without compiling code. Integrated with modern desktop buses, it complements tools like D-Bus activation for seamless service interaction.
CAVEATS
Subcommand-specific options apply; GVariant types required for complex args. Not for production; prefer libraries for apps.
SUBCOMMANDS
call: Invoke method e.g. gdbus call ...
emit: Emit signal.
introspect: Dump XML interface.
monitor: Watch object traffic.
object-manager: Track object paths.
EXAMPLE
gdbus introspect --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus
Introspects the bus root object.
HISTORY
Introduced in GLib 2.26 (March 2010) as part of GIO to simplify D-Bus CLI access, evolving with GLib for better GVariant support and object manager features.
SEE ALSO
dbus-send(1), dbus-monitor(1), qdbus(1)


