[DBUS]dbus_bus_start_service_by_name problem

John (J5) Palmieri johnp at redhat.com
Thu Jul 7 05:15:04 EST 2005

On Wed, 2005-07-06 at 15:26 -0300, Claudio Takahasi wrote:
> Hi folks,
> Is it possible/allowed start a daemon/app using 
> system bus or it is restricted to session bus?
> I executed a test connected on the session bus and
> my app was started normally. However, when
> I changed my code to connect to the system bus
> my app is not initialized.
> The dbus_bus_start_service_by_name result is 0
> and the message error displayed is "exited 
> with status 1"
> The ".service" file is located in the directory
> /usr/share/dbus-1/services. Both configuration 
> files(session.conf and system.conf) contains a 
> reference to the servicedir 
> "<servicedir>/usr/share/dbus-1/services</servicedir>"
> D-Bus version: dbus-0.34
> SO: Debian Linux 2.6.10-1-686

You can but the application will be started up as whatever user the
daemon is running in which is most likely not what you want.  What needs
to happen is there needs to be a separate daemon that runs as root that
does the system activation.  Of course much thought has to go into how
to do this securely.  It is probably not the best idea in the world to
point both service directories to the same location.

John (J5) Palmieri <johnp at redhat.com>

More information about the dbus mailing list