Issues while using DBUS over TCP

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Aug 6 07:41:29 PDT 2008


On Wed, 06 Aug 2008 at 10:09:06 -0400, Schmottlach, Glenn wrote:
> This is a hack (particularly the TcpSessionBus) class and obviously
> could use some refinement. The default implementation of the Python
> SessionBus class does not allow you to specify a TCP address and
> required this work-around.

... that's because you're not using "the" session bus (for which SessionBus
is suitable), you're using an entirely different dbus-daemon (which
happens to be someone else's session bus, but the client code doesn't
care). So, don't use SessionBus, use BusConnection directly.

> Also, the "_connection" property of the
> TcpSessionBus class is important or the Python Dbus implementation will
> not wire up the bus class so that it can be used to receive
> signals/events from the service.

If this still doesn't work when you're using BusConnection, please file a
bug - it ought to work without you having to define a _connection property.

You should be able to do this:

remote_bus = BusConnection(addr, mainloop)
remote_bus.get_object(...)
remote_bus.connect_to_signal(...)

    Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080806/41164b66/attachment.pgp 


More information about the dbus mailing list