<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><BR><BR><BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
<BR>
From: robert_rawlins@hotmail.com<BR>To: dbus@lists.freedesktop.org<BR>Subject: RE: Python DBus - Creating A Service<BR>Date: Wed, 6 Feb 2008 16:13:38 +0000<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass EC_body.hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
> On Wed, 2008-02-06 at 15:47 +0000, Robert Rawlins wrote:<BR>> > Hello Guys,<BR>> > <BR>> > I hope this is the right place to ask my question, apologies if I<BR>> > should be on another list, please feel free to point me in the right<BR>> > direction if that is the case. I'm new to dbus, I've been using it for<BR>> > a little while consuming other peoples services and things like that.<BR>> > <BR>> > Today I've started working on my own service, however I'm struggling a<BR>> > little to get it working. I've been using the following example code<BR>> > to try and get a service running on my system<BR>> > http://paste.lisp.org/display/45824 however when I attempt to run this<BR>> > python script I get the following error:<BR>> > <BR>> > File "TestService.py", line 15, in ?<BR>> > myservice = MyDBUSService()<BR>> > File "TestService.py", line 7, in __init__<BR>> > bus_name = <FONT face="">dbus.service.BusName</FONT>('org.frankhale.helloservice',<BR>> > bus=<FONT face="">dbus.SessionBus</FONT>())<BR>> > File "/var/lib/python-support/python2.4/dbus/_<FONT face="">dbus.py</FONT>", line 217, in<BR>> > __new__<BR>> > mainloop=mainloop)<BR>> > File "/var/lib/python-support/python2.4/dbus/_<FONT face="">dbus.py</FONT>", line 106, in<BR>> > __new__<BR>> > bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)<BR>> > File "/var/lib/python-support/python2.4/dbus/bus.py", line 125, in<BR>> > __new__<BR>> > bus = cls._new_for_bus(address_or_type, mainloop=mainloop)<BR>> > <FONT face="">dbus.exceptions.DBusException</FONT>:<BR>> > org.freedesktop.<FONT face="">DBus.Error.Spawn.ExecFailed</FONT>: Failed to execute<BR>> > dbus-launch to autolaunch D-Bus session<BR>> > <BR>> > Does anyone have any ideas as to why I'm getting this error message?<BR>> > <BR>> > Thanks guys, I appreciate any help you can offer.<BR>> > <BR>> > Rob<BR>> > <BR>> You don't have a bus running and the library can't find dbus-launch to<BR>> autostart one.<BR>> <BR>> -- <BR>> John (J5) Palmieri <johnp@redhat.com><BR>> <BR> <BR>> Hi John,<BR> <BR>> 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?<BR>> Sorry for the n00bish questions, this is all new ground for me.<BR>> Thanks John,<BR>> Rob<BR>
<BR>
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:<BR>
<BR>
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.<BR><BR>Thanks,<BR>
<BR>
Rob <BR><BR><BR>
<HR>
<BR>
Sounds like? How many syllables? <A href="http://www.searchcharades.com/" target=_blank>Guess and win prizes with Search Charades!</A> <BR></BLOCKQUOTE><br /><hr />Sounds like? How many syllables? <a href='http://www.searchcharades.com' target='_new'>Guess and win prizes with Search Charades!</a></body>
</html>