[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: one more on plan (fwd)



On Fri, 21 Nov 1997, Colin R. Telmer wrote:

> One of the packages that I maintain includes a daemon, pland, that is
> recommended to be started in users' .xsession file. Previously, after
> logout, the daemon just hung around and is therefore recommended to be
> started as pland -k, where the -k kills any existing pland before starting
> a new one. Another switch, invoked as pland -K, kills any existing pland
> and then exits without starting a new one. Dirk Eddelbuetel advised me to
> do something to kill pland on logout as it is a waste of resources so I
> thought that I could add "pland -K" to my .xsession as the last line so
> that when I quite my window manager (second last line), pland -K is
> invoked and any existing daemon is killed. I tried this but it does not
> work. Am I doing something wrong or is there another way to go about this?
> I suppose I could look at .logout but I would like to keep this in
> .xsession as it is an X app and that seems cleaner. Any suggestions are
> gratefully appreciated. My .xsession is below. Cheers, Colin.
> 
<SNIP>
> This doesn't work for me:
> 
> cgowave-4-237:~$ more .xsession
> if [ -x /usr/lib/plan/pland ] ; then
>     /usr/lib/plan/pland -k
> else
>     echo "Can't find pland" 
> fi
> 
> xhost +$HOSTNAME.cgocable.net
> exec /usr/X11R6/bin/fvwm2
> /usr/lib/plan/pland -K
> 

The problem is that when you say 'exec whatever', the process that's
parsing this file doesn't just create a subprocess to execute fvwm2, and
then wait for the subprocess's completion; instead the process _becomes_ a
process executing that 'whatever'.  Among other things, this means that it
completely forgets about this file.  The solution is to remove the word
'exec'.  (so that that line simply reads '/usr/X11R6/bin/fvwm2')  This
causes one extra process to be sitting around while you're using X, but
that shouldn't be too much overhead.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: