user-space daemon sample script

Daniele Favara (nomed) danjele at gmail.com
Thu Dec 8 14:20:20 EET 2005


Il giorno gio, 08/12/2005 alle 00.54 -0500, Havoc Pennington ha scritto:
> On Wed, 2005-12-07 at 13:09 +0100, Daniele Favara (nomed) wrote:
> > what does it happen if i run an user-space daemon ?
> > 

i'm sorry but i made a mistake here the message :

--------
> On Wed, 2005-12-07 at 13:09 +0100, Daniele Favara (nomed) wrote:
> > what does it happen if i run an user-space daemon ?
> > 
> > I think a sample script to write such scripts should be integrated
in
> > freedesktop standard, as there are a lot of user-space daemons that
> > could be started using that method and that will be still running
when
> > the user disconnect to X server ... 
> > 
> > the problem is that if i relogin to X server i'll have 2 daemon.
> 
> If you mean per-user daemon, I think you don't really want one of
these.
> There's no good way to implement it, except a client-server
architecture
> (like imap or ldap), and you can't make that work "out of the box"
> 
> In practice if you try to do a per-user daemon you will get a
> per-(user,machine)-pair daemon, and that is just not very useful; at
> that point you may as well make things more sane and do a per-session
> daemon. Almost all daemons in GNOME/KDE are per-session. For
per-session
> you can either connect to the X server or to the session dbus daemon
or
> to DCOP as a way of tracking the session lifecycle. 
> 
> If per-(user,machine) is OK, then per-session should also be OK; in
both
> cases you can have multiple daemons per home directory and per user
> running at the same time.
> 


ok, thanks.

but how should i start ivman ? 

to place a script in Desktop/Autostart with "ivman &" is not the best
way i feel.

-----------


and here the script:

#!/bin/sh
exec 1>&2
echo -n "Launching volume manager... "
if ps -C ivman -o user | grep -q $USER
then
  echo "Already running."
  exit
else
  echo "OK"
  exec ivman
fi






More information about the xdg mailing list