I am building custom dbus
service for my own demands and want it to start automatically when someone need it. For that purpose I've created .service
file like this
[D-Bus Service] Name=com.mycompany.servicename Exec=/home/myuser/Workspace/service-start User=myuser
Here I just changed the actual name of service and executable but this is not the point. I've double checked real names - it matches exactly. I've placed this file under name com.mycompany.servicename.service to /usr/share/dbus-1/services folder (I am using Ubuntu 11.10) Executable file has x
permissions for everyone. And here is the problem - when I am trying to start client that performs
bus = dbus.SessionBus() bus.get_object('com.mycompany.servicename','/path/to/object')
I get dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.mycompany.servicename was not provided by any .service files
Object with path '/path/to/object'
is registered right after service start. I just don't get why dbus
can't find my .service
file. Maybe I am missing something? Any ideas?
Edit I've managed to get D-BUS automatically start my script. The section of .service
file should be named [D-BUS Service]
instead of [D-Bus service]