dbus python working? "Unable to determine the address of the
message bus"
Havoc Pennington
hp@redhat.com
Sun, 25 Jan 2004 19:00:14 -0500
On Sun, 2004-01-25 at 17:37, Jeff Bowden wrote:
> I've got dbus 0.20 from debian and I'm trying out the python bindings.
> I grabbed the examples from
> http://dri.freedesktop.org/cgi-bin/cvsweb/dbus/dbus/python/examples/ but
> when I run example-server.py I get:
>
> Traceback (most recent call last):
> File "./dbus-server.py", line 17, in ?
> service = dbus.Service("org.designfu.SampleService")
> File "/usr/lib/python2.3/site-packages/dbus.py", line 183, in __init__
> self._bus = Bus()
> File "/usr/lib/python2.3/site-packages/dbus.py", line 57, in __init__
> self._connection = dbus_bindings.bus_get(bus_type)
> File "/build/dstone/dbus-0.20/python/dbus_bindings.pyx", line
> 1155, in dbus_bindings.bus_get
> dbus.DBusException: Unable to determine the address of the message bus
>
>
> I have "dbus-daemon-1 --session" running, btw
>
> Are these examples out of date? The cvs page says they are 3 months old.
>
To locate the session bus there's an env variable that has to be set;
one of the man pages should discuss, see also "man dbus-launch".
Maybe the python bindings default to the system bus though, I don't
know.
Havoc