Python DBus - Creating A Service

Robert Rawlins robert_rawlins at
Wed Feb 6 08:50:20 PST 2008

From: robert_rawlins at hotmail.comTo: dbus at lists.freedesktop.orgSubject: RE: Python DBus - Creating A ServiceDate: Wed, 6 Feb 2008 16:13:38 +0000

> 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> > however when I attempt to run this> > python script I get the following error:> > > > File "", line 15, in ?> > myservice = MyDBUSService()> > File "", line 7, in __init__> > bus_name = dbus.service.BusName('org.frankhale.helloservice',> > bus=dbus.SessionBus())> > File "/var/lib/python-support/python2.4/dbus/", line 217, in> > __new__> > mainloop=mainloop)> > File "/var/lib/python-support/python2.4/dbus/", line 106, in> > __new__> > bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)> > File "/var/lib/python-support/python2.4/dbus/", 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>>  > Hi John, > Thanks for getting back to me mate, I appreciate it. I could use a little more help though. How can I start a bus? or how can I get the library to find > the functions it needs to auto start one?> Sorry for the n00bish questions, this is all new ground for me.> Thanks John,> Rob
John, as a quick update, I've just installed a package on my system called dbus-x11 which appears to contrain dbus-launch, however I'm now recieving a slightly different error message:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.Thanks,

Sounds like? How many syllables? Guess and win prizes with Search Charades! 
Who's friends with who and co-starred in what?
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the dbus mailing list