Using D-Bus To Start Apps

Trilok Soni soni.trilok at
Mon Feb 25 10:44:09 PST 2008

Hi John,

On Mon, Feb 25, 2008 at 11:45 PM, John (J5) Palmieri <johnp at> wrote:
>  On Mon, 2008-02-25 at 04:23 -0800, Thanh Tran wrote:
>  > I would like to use the D-Bus and HAL service to start
>  > specific apps.  I plan to write a service wich reads
>  > the D-Bus and looks for specific messages from the HAL
>  > service.  For example, HAL reports a USB CD ROM drive
>  > has been recently attached by the user.  My service
>  > would read the D-Bus and start another application
>  > based on the device detected.  I think I can create my
>  > service using the D-Bus C API.  However, is there an
>  > easier way?  Is writing a separate service over-kill? Thanks.
>  It depends what you want to do.  Hal already has the ability to run
>  scripts as root based off of matches.  If you are running something in
>  the user's session then look at gnome-volume-manager which exec's
>  programs based on hotplug events from HAL.  You can also use D-Bus
>  activation which only works in the session currently but the Beta
>  releases of the new D-Bus support system activation.

Could you please point to the exact beta release version or git
version which support this system activation? We had to switch our
dbus service to system bus from session, as one of the properitery
media application which was implementing dbus service had to run under
root (as it was internally accessing /dev/mem interface for ARM-DSP
communication), and the web-server wanted to run as un-privileged
user, so as these two application can't run under the single user
login, session bus was not suitable, but even under system bus, we
want to activate this media application if it is not running and
webserver (here dbus-client) initiate the request for

---Trilok Soni

More information about the dbus mailing list