Codex

GDBUS

Section: User Commands (1)

Updated:

Index?action=index Return to Main Contents


NAME

gdbus - Tool for working with D-Bus objects

SYNOPSIS

:gdbus introspect [--system | --session | --address address] --dest bus_name --object-path /path/to/object [--xml] [--recurse] [--only-properties]

:gdbus monitor [--system | --session | --address address] --dest bus_name [--object-path /path/to/object]

:gdbus call [--system | --session | --address address] --dest bus_name --object-path /path/to/object --method org.project.InterfaceName.MethodName [--timeout seconds] ARG1 ARG2...

:gdbus emit [--system | --session | --address address] --object-path /path/to/object --signal org.project.InterfaceName.SignalName [--dest unique_bus_name] ARG1 ARG2...

:gdbus help

DESCRIPTION

gdbus

is a simple tool for working with D-Bus objects.

COMMANDS

introspect

Prints out interfaces and property values for a remote object. For this to work, the owner of the object needs to implement the org.freedesktop.DBus.Introspectable interface. If the --xml option is used, the returned introspection XML is printed, otherwise a parsed pretty representation is printed. The --recurse option can be used to introspect children (and their children and so on) and the --only-properties option can be used to only print the interfaces with properties.

monitor

Monitors one or all objects owned by the owner of bus_name.

call

Invokes a method on a remote object. Each argument to pass to the method must be specified as a serialized GVariant except that strings do not need explicit quotes. The return values are printed out as serialized GVariant values.

emit

Emits a signal. Each argument to include in the signal must be specified as a serialized GVariant except that strings do not need explicit quotes.

help

Prints help and exit.

BASH COMPLETION

gdbus ships with a bash completion script to complete commands, destinations, bus names, object paths and interface/method names.

EXAMPLES

  This shows how to introspect an object - note that the value of each

  property is displayed:

The --recurse and --only-properties options can be useful when wanting to inspect all objects owned by a particular process:

In a similar fashion, the introspect command can be used to learn details about the Notify method:

With this information, it's easy to use the call command to display a notification

Monitoring all objects on a service:

Monitoring a single object on a service:

Emitting a signal:

Emitting a signal to a specific process:

BUGS

Please send bug reports to either the distribution bug tracker or the upstream bug tracker at m[blue]https://bugzilla.gnome.org/enter_bug.cgi?product=glibm[].

SEE ALSO

dbus-send?(1)


Index

NAME

SYNOPSIS

DESCRIPTION

COMMANDS

BASH COMPLETION

EXAMPLES

BUGS

SEE ALSO


More Man Pages