Python DBus - Creating A Service
John (J5) Palmieri
johnp at redhat.com
Wed Feb 6 08:09:30 PST 2008
On Wed, 2008-02-06 at 15:47 +0000, Robert Rawlins wrote:
> Hello Guys,
>
> I hope this is the right place to ask my question, apologies if I
> should be on another list, please feel free to point me in the right
> direction if that is the case. I'm new to dbus, I've been using it for
> a little while consuming other peoples services and things like that.
>
> Today I've started working on my own service, however I'm struggling a
> little to get it working. I've been using the following example code
> to try and get a service running on my system
> http://paste.lisp.org/display/45824 however when I attempt to run this
> python script I get the following error:
>
> File "TestService.py", line 15, in ?
> myservice = MyDBUSService()
> File "TestService.py", line 7, in __init__
> bus_name = dbus.service.BusName('org.frankhale.helloservice',
> bus=dbus.SessionBus())
> File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 217, in
> __new__
> mainloop=mainloop)
> File "/var/lib/python-support/python2.4/dbus/_dbus.py", line 106, in
> __new__
> bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
> File "/var/lib/python-support/python2.4/dbus/bus.py", line 125, in
> __new__
> bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
> dbus.exceptions.DBusException:
> org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute
> dbus-launch to autolaunch D-Bus session
>
> Does anyone have any ideas as to why I'm getting this error message?
>
> Thanks guys, I appreciate any help you can offer.
>
> Rob
>
You don't have a bus running and the library can't find dbus-launch to
autostart one.
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list