如何打印出D-Bus上所有可用信息的树?
*Bus Name
* Interface
*Method
*Signature
* Interface
*Method
*Signature
*Method
*Signature
*Bus Name
* Interface
*Method
*Signature发布于 2011-10-17 23:22:07
我已经创建了一个git存储库来演示如何解决这个问题:https://github.com/smokedice/PyDBusTree
代码相当慢,因为它没有使用回调。如果任何人想要改进代码,请将其发布在这里,或者推送到存储库。
发布于 2012-01-05 19:35:08
您可以使用DFeet等dbus调试工具以一种良好的结构化方式查看通过DBus公开的所有内容。
发布于 2017-07-06 19:04:39
除了D-Feet (在前面的回答中提到),gdbus command line tool还将允许对给定的唯一或众所周知的总线名称上的特定对象路径进行自省:
$ 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:
};
…
}https://stackoverflow.com/questions/7756755
复制相似问题