kannerke
March 19th, 2009, 03:37 PM
Hello all,
I'm trying to use dbus inside cgi-python scripts as IPC to communicate with external processes running on the web server.
The first error I encountered was:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed
I was able to solve this by putting the environment variables, returned by executing the dbus-launch command, see
http://stackoverflow.com/questions/257658?sort=votes
At this point, I encounter the following problem:
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name path.to.my.service was not provided by any .service files
My target service was running and waiting for incoming dbus calls.
This problem was not totally unexpected because executing the 'dbus-launch' command probably initiates a new dbus.
Can someone help me with how to connect to the right dbus calling bus = dbus.SessionBus() or how to connect the new dbus with the exisitng dbus.
To be clear: I have a python script running in a terminal, registered a dbus service and a python cgi script, executed by apache2 willing to access this service.
kind regards,
Peter
I'm trying to use dbus inside cgi-python scripts as IPC to communicate with external processes running on the web server.
The first error I encountered was:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed
I was able to solve this by putting the environment variables, returned by executing the dbus-launch command, see
http://stackoverflow.com/questions/257658?sort=votes
At this point, I encounter the following problem:
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name path.to.my.service was not provided by any .service files
My target service was running and waiting for incoming dbus calls.
This problem was not totally unexpected because executing the 'dbus-launch' command probably initiates a new dbus.
Can someone help me with how to connect to the right dbus calling bus = dbus.SessionBus() or how to connect the new dbus with the exisitng dbus.
To be clear: I have a python script running in a terminal, registered a dbus service and a python cgi script, executed by apache2 willing to access this service.
kind regards,
Peter