[RFC] Sane CLI for dbus

Luis Javier Merino ninjalj at gmail.com
Thu Apr 1 05:20:32 PDT 2010


Hi,

Attached is a dcop-style CLI for dbus, meant to call dbus from the
shell (think d-feet for the shell), so for instance, to change
Konsole's window title you'd do:

$ dbus-sane.pl
org.freedesktop.DBus
org.freedesktop.PowerManagement
org.freedesktop.Notifications
[...snip...]
org.kde.konsole
[...snip...]

$ dbus-sane.pl org.kde.konsole
I org.freedesktop.DBus.Introspectable
 M Introspect (out s xml_data)
O MainWindow_1

$ dbus-sane.pl org.kde.konsole MainWindow_1
 [...snip...]
I org.kde.konsole.KMainWindow
 M setCaption (in s caption)
 M setCaption (in s caption, in b modified)
 M setPlainCaption (in s caption)
 M appHelpActivated ()
 M setSettingsDirty ()
 P hasMenuBar (b, read)
 P autoSaveSettings (b, read)
 P autoSaveGroup (s, read)
 P initialGeometrySet (b, read)
[...snip...]
I com.trolltech.Qt.QWidget
[...snip...]
 P windowTitle (s, readwrite)
[...snip...]
I org.freedesktop.DBus.Properties
 M Get (in s interface_name, in s property_name, out v value)
 M Set (in s interface_name, in s property_name, in v value)
 M GetAll (in s interface_name, out a{sv} values)
I org.freedesktop.DBus.Introspectable
 M Introspect (out s xml_data)
O actions

$ dbus-sane.pl org.kde.konsole MainWindow_1 setPlainCaption foobar

$ dbus-sane.pl org.kde.konsole MainWindow_1 Get
org.freedesktop.DBus.Properties WindowTitle
'foobar'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-sane.pl
Type: application/x-perl
Size: 3163 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100401/6f53ed3e/attachment.bin>


More information about the dbus mailing list