Re: Start something from sawfishrc
- From: Michal Jaegermann <michal harddata com>
- To: c marschalek schrack-seconet com
- Cc: Thomas de Grenier de Latour <degrenier easyconnect fr>, sawfish-list gnome org
- Subject: Re: Start something from sawfishrc
- Date: Mon, 10 Nov 2003 13:54:57 -0700
On Mon, Nov 10, 2003 at 07:57:52AM +0100, c marschalek schrack-seconet com wrote:
>
> >You can use:
> > (system "your-program &")
>
> Thanks for your answer!
>
> >But I'm not sure it is such a good idea, because the rc file will be
> >re-read if for instance you restart sawfish, and then launch this apps
> >again. What about starting them from ~/.xinitrc instead
>
> hm... you're right about that.
Pretty easy to make sure that this does not happen.
(system "[ \"$(/sbin/pidof my_app)\" ] || my_app &")
or something equivalent. If you have troubles with quoting launch
your applications through a separate "helper" shell script which
does that checking. The only problem is if you _want_ to have
multiple instances of some app started and then you have to do some
counting. Also if you have many users on a system you have to
check that a running instance does not belong to somebody else, so
this is tad more complicated, but the general idea is the same.
BTW - if you are grepping through an output from 'ps' looking
for some particular application then do something like
ps <flags> | grep '[e]macs'
and then you will not find this grep process itself.
Michal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]