Xpra: Ticket #450: forwarding dbus objects - generalized

Originally recorded as #22 (more dbus quircks in #83)

It would be nice to expose server-side dbus objects to the client. Not just notifications as done in #22. So client-side applications could interact with server-side applications through the link we already have.

Based on dbus-python examples - which we should be able to forward easily enough:

For clients that do not have dbus support (OSX, win32 or posix clients without a dbus session running), we can still provide ways of interacting with the remote dbus session:

For services we cannot introspect... nothing for now.
Since there is nothing that requires us to be tied to dbus, we should ensure that other RPC tools can be plugged in without too much effort - (whilst still targetting dbus as the main RPC implementation)



Thu, 31 Oct 2013 14:51:14 GMT - Antoine Martin: owner, status, description changed; keywords set


Thu, 31 Oct 2013 15:06:00 GMT - Antoine Martin: description changed


Mon, 04 Nov 2013 12:53:56 GMT - Antoine Martin: description, summary changed


Thu, 14 Nov 2013 09:50:57 GMT - Antoine Martin:

More pointers:

The first problem is that although dbus defines an introspection interface, the output is in XML (PITA!). And we don't want to know about the interface we export in advance. Yuk, even dbus-inspector is parsing XML...

Another, bigger problem is that dbus calls expect to return immediately, and will block the main loop until we do return... which will never return if we deadlock trying to use the network from the mainloop (more info here). Using the nested main loop code is off-putting, and would not work on osx. Using our own dedicated dbus thread for the main loop could work, but would not play well with any other dbus calls we could end up making... (ie: notifications)

Also, I can't see how we would dynamically add the methods we found through introspection to an object we register. The service method are normally registered using annotations..

Finally, the gtk all-in-one we use on win32 does not include dbus... Although equivalent for windows.


Fri, 15 Nov 2013 10:38:00 GMT - Antoine Martin: attachment set

example dbus service which can be used for testing


Fri, 15 Nov 2013 10:38:18 GMT - Antoine Martin: attachment set

example client for the example service


Fri, 15 Nov 2013 10:48:08 GMT - Antoine Martin: owner, status changed

As of r4759, we can call server-side dbus services and get the reply asynchronously:


The number of arguments to the service's function is variable and optional. You can specify as many or as few as you like, and the type of the arguments will be preserved over the wire.



Attached is an example dbus service (and an example client - just for completeness, not used), start it from within an xpra session which has a dbus server, then you can interact with it from the client end:

Then you just trigger the dbus call using the key combination.


To enable the dbus server-side debugging, set:

XPRA_DBUS_DEBUG=1 xpra start ...

Probably complete enough for a first round of feedback.


Thu, 09 Jan 2014 00:24:44 GMT - alas:

It took some hand-holding from Smo to get the python dbus-listener.py in place on the server, but once that was done the Notify message came through clear as... day.

If you need me to run the debugger to get some output (because I'm sure you need the reading) let me know, but since it seemed to work exactly as hoped with a fedora 19 client and server, I suspect that won't be necessary.


Thu, 09 Jan 2014 01:35:37 GMT - Antoine Martin: status changed; resolution set


Sat, 23 Jan 2021 04:55:52 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/450