LinuxCommandLibrary

gdbus

Interact with D-Bus services

SYNOPSIS

gdbus introspect|call|monitor|emit [OPTIONS...] BUS_NAME OBJECT_PATH INTERFACE_NAME [METHOD_NAME]

PARAMETERS

introspect
    Introspect a D-Bus object and print its interface information in XML format.

call
    Call a method on a D-Bus object.

monitor
    Monitor D-Bus signals.

emit
    Emit a D-Bus signal.

BUS_NAME
    The name of the D-Bus bus to connect to (e.g., org.freedesktop.DBus).

OBJECT_PATH
    The path of the D-Bus object (e.g., /org/freedesktop/DBus).

INTERFACE_NAME
    The name of the D-Bus interface (e.g., org.freedesktop.DBus.Introspectable).

METHOD_NAME
    The name of the method to call (only for 'call' command).

--session
    Connect to the session bus.

--system
    Connect to the system bus.

DESCRIPTION

gdbus is a command-line tool for interacting with the D-Bus message bus. It allows users to inspect bus contents, call methods on remote objects, monitor signals, and generally interact with D-Bus services.
It provides a powerful and flexible way to debug and test D-Bus applications, as well as to automate tasks that involve D-Bus communication. gdbus can list objects, interfaces, and methods on a service, making it easy to explore available functionality. Method calls can be constructed directly from the command line, simplifying testing and troubleshooting.
It supports both system and session buses, making it suitable for a wide range of applications. Essentially, it provides a command-line interface to the D-Bus API.

COMMON USAGE

A common use case is to inspect the properties of a service using `gdbus introspect`. Another common action is using `gdbus call` to trigger actions that may be performed by other processes.

SEE ALSO

Copied to clipboard