Reputation: 1020
How can I print out a tree of all the available information on D-Bus?
*Bus Name
* Interface
*Method
*Signature
* Interface
*Method
*Signature
*Method
*Signature
*Bus Name
* Interface
*Method
*Signature
Upvotes: 1
Views: 1989
Reputation: 5713
As well as D-Feet (mentioned in an earlier answer), the gdbus
command line tool will allow introspection of a particular object path on a given unique or well-known bus name:
$ gdbus introspect --session --dest org.gnome.Contacts --object-path /org/gnome/Contacts
node /org/gnome/Contacts {
interface org.freedesktop.DBus.Properties {
methods:
Get(in s interface_name,
in s property_name,
out v value);
…
signals:
PropertiesChanged(s interface_name,
a{sv} changed_properties,
as invalidated_properties);
properties:
};
…
}
Upvotes: 2
Reputation: 4858
You can use the dbus debugging tools like DFeet to see everything exposed over the DBus in a nice structured fashion.
Upvotes: 3
Reputation: 1020
I have created a git repository to demonstrate how to solve this problem: https://github.com/smokedice/PyDBusTree
The code is rather slow because it doesn't use call backs. If anyone would like to improve the code please post it here, or push to the repository.
Upvotes: 1