PDA

View Full Version : Hacking compiz with dbus?


enigma_0Z
October 9th, 2007, 11:37 PM
I'm trying to write up some scripts to manipulate compiz through dbus, but I can't seem to get anything to work...

Is there some intro to dbus with compiz? I tried this:

dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz org.freedesktop.compiz.getDisplayData

But, this responds with an "org.freedesktop.DBus.Error.UnknownMethod"...

Is there some way I can list what objects I can mainuplate, and what methods/functions/whatever are available for an object?

Thanks.

vrunner
October 19th, 2007, 10:03 AM
Try this :

dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz org.freedesktop.DBus.Introspectable.Introspect


You get back a list of methods, and nodes.
For each node that you get back, you can query further..

For example for the animation plugin, you get back node screen0
so query further for /org/freedesktop/compiz/animation/screen0


dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/animation/screen0 org.freedesktop.DBus.Introspectable.Introspect


And so on..

Deciare
October 19th, 2007, 04:00 PM
Oh, how interesting, I'd like to try this as well. But when I run either of the commands you offered above, I receive this error:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files

Do you know how I might go about finding/generating/getting these .service files? I used to look in the XML files stored under /usr/share/compiz when looking for triggerable actions (type="action"), but if I can get your method working, that'll probably be easier.