Usage:
gdbus COMMAND
Commands:
help Shows this information
introspect Introspect a remote object
monitor Monitor a remote object
call Invoke a method on a remote object
emit Emit a signal
wait Wait for a bus name to appear
Use “gdbus COMMAND --help” to get help on each command.
Examples (13) from the manual page, untested
gdbus introspect --system \
This shows how to introspect an object — note that the value of each property is displayed:gdbus introspect --system --dest org.freedesktop.UPower --object-path / --recurse --only-properties
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:gdbus call --session \
With this information, it’s easy to use the call command to display a notification:gdbus call --session \
Call a method with file handle argument:gdbus monitor --system --dest org.freedesktop.ConsoleKit
Monitoring all objects on a service:gdbus monitor --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/AccessPoint/4141
Monitoring a single object on a service:gdbus emit --session --object-path /foo --signal org.bar.Foo "['foo', 'bar', 'baz']"
Emitting a signal:gdbus emit --session --object-path /bar --signal org.bar.Bar someString --dest :1.42
Emitting a signal to a specific process:gdbus wait --session org.bar.SomeName
Waiting for a well-known name to be owned on the bus;gdbus wait --session --activate org.bar.SomeName
Auto-starting then waiting for a well-known name to be owned on the bus:gdbus wait --session --activate org.bar.PrerequisiteName org.bar.SomeName
Auto-starting a different service, then waiting for a well-known name to be owned on the bus.gdbus wait --session --timeout 30 org.bar.SomeName
Waiting for a well-known name and giving up after 30 seconds.
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.