qdbus
Communicate with D-Bus applications
TLDR
List available service names
List object paths for a specific service
List methods, signals and properties available on a specific object
Execute a specific method passing arguments and display the returned value
Display the current brightness value in a KDE Plasma session
Set a specific brightness to a KDE Plasma session
Invoke volume up shortcut in a KDE Plasma session
Gracefully log out and then do nothing, reboot or shut down
SYNOPSIS
qdbus [--system | --session] [service name] [object path] [method name] [arguments...]
PARAMETERS
--system
Connect to the system bus.
--session
Connect to the session bus (default).
[service name]
The name of the D-Bus service to connect to. Example: org.kde.dolphin
[object path]
The path to the object within the service. Example: /org/kde/dolphin/window/1
[method name]
The name of the method to call on the object. Example: openLocation
[arguments...]
Arguments to pass to the method.
--help
Show help options.
--version
Show program version.
DESCRIPTION
qdbus is a command-line tool used to interact with the D-Bus message bus. D-Bus is an inter-process communication (IPC) mechanism that allows different applications running on the same system to communicate with each other.
qdbus enables users to inspect and manipulate D-Bus services, objects, and methods from the command line. This can be useful for debugging, testing, or automating tasks that involve D-Bus. It allows you to list available services, introspect objects to discover their methods and signals, call methods on objects, and monitor signals emitted by objects. It's a powerful tool for understanding and working with D-Bus-based applications and services, especially in environments like KDE where D-Bus is heavily used. The command exposes a wealth of information about the D-Bus system and its connected applications.
CAVEATS
qdbus requires the D-Bus daemon to be running. The exact syntax for arguments can vary depending on the method being called. Correctly interpreting and using qdbus requires understanding the structure and API of the specific D-Bus services and objects you're interacting with. It's designed to function within environments leveraging D-Bus.
INTROSPECTION
Without specifying a method name, qdbus can be used to introspect an object and list its methods, signals, and properties.
ERROR HANDLING
qdbus will typically print error messages to the console if a method call fails or if there are issues connecting to the D-Bus. It's crucial to examine these error messages for debugging.
HISTORY
qdbus is part of the Qt framework and was developed alongside Qt's D-Bus integration features. Its initial versions were closely tied to Qt's evolution, offering a command-line interface to Qt's D-Bus API. Over time, qdbus has matured into a standalone utility, becoming a valuable tool for interacting with D-Bus regardless of the underlying framework (although its Qt origins are evident). It is commonly used in KDE environments and other Linux distributions that utilize D-Bus for inter-process communication.
SEE ALSO
dbus-send(1), dbus-monitor(1)