Creating a .service File
Justin Brown
justin.brown at fandingo.org
Mon Oct 17 21:56:17 PDT 2011
Hello,
I'm sure this is a relatively simple problem, but I haven't been able to
find any guidance on my problem.
I'm trying to auto-start a DBus service when my client program starts. I've
setup a .service file, but it's not working.
My service name is
org.fandingo.PMP
I register the name with a python server with
name = dbus.service.BusName('org.fandingo.PMP', session_bus)
object = PMPService(session_bus, '/PMPService', PMPProxy())
I can connect to this fine if I manually run the server code with the
following from the client
remote = bus.get_object('org.fandingo.PMP', '/PMPService')
So the server and client both work if invoked manually. If I just try the
client, I get the following Python exception
dbus.exceptions.DBusException:
org.freedesktop.DBus.Error.ServiceUnknown: The name org.fandingo.PMP
was not provided by any .service files
Here is my .service file
-rw-r--r--. root root unconfined_u:object_r:usr_t:s0
/usr/share/dbus-1/services/org.fandingo.PMP.service
These permissions and SELinux labels are identical to the other .service
files. (I've even tried a good ol' `setenforce 0`.)
The .service file contains
[D-Bus Service]
Name=org.fandingo.PMP
Exec=/home/justin/code/python/pmp/Server.py
User=justin
pmpserver.py is executable and has the correct shebang.
Does anyone see any problems with my configuration?
Thanks,
Justin Brown
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20111017/598aad55/attachment.html>
More information about the dbus
mailing list