![](https://seccdn.libravatar.org/avatar/016ae51e77754dc8944dd2738ac90e07.jpg?s=120&d=mm&r=g)
On Wed, 5 Jul 2000, S.Toms wrote: st> On Wed, 5 Jul 2000, Eduardo Carriles 'Mezcalito' wrote: st> st> ec> Hi, S.: st> ec> st> ec> "S.Toms" wrote: st> ec> st> ec> > On Tue, 4 Jul 2000, Greg Thomas wrote: st> ec> > st> ec> > [snip] st> ec> > st> ec> > I came up with the following which I run through crontab, which will st> ec> > take care of the lock file for you automatically. st> ec> > st> ec> > #!/bin/sh st> ec> > # st> ec> > if ! ps cx | grep netscape >/dev/null ; then st> ec> > if test -L $HOME/.netscape/lock ; then st> ec> > echo "Deleting expired lock file..." st> ec> > rm -f $HOME/.netscape/lock st> ec> > fi st> ec> > fi st> ec> st> ec> Come on S. how do you think the _cron_, wich runs as daemon will resolve $HOME?? st> ec> st> ec> Try again and give it a second thought. st> ec> st> Also, I have it entered in my user crontab, which will resolve HOME, LOGNAME and SHELL, it will also resolve MAILTO, see 'man 5 crontab' for available variables in the cron files. Heres the crontab entry I use if your interested, 0-59/1 * * * * /home/skull/bin/dellock >/dev/null 2>&1 I'm also thinking of rewriting the above routine as a wrapper for any browser I use, once I figure out what types of lock/run files are created by the various others. That way I can use it for lynx, athena, netscape, etc.. with the same results. At which point I'll do away with the crontab option all together. st> Works for me :) been using it for quite some time now with no problems. st> st> ec> > st> ec> > st> ec> > just create a file, I used the name 'dellock' and then call it via st> ec> > crontab, or, you can create a wrapper program with it that runs the above st> ec> > then attempts to run netscape immediately after. st> ec> > st> ec> > #!/bin/sh st> ec> > # st> ec> > if ! ps cx | grep netscape >/dev/null ; then st> ec> > if test -L $HOME/.netscape/lock ; then st> ec> > echo "Deleting expired lock file..." st> ec> > rm -f $HOME/.netscape/lock st> ec> > else st> ec> > Netscape -no-about-splash -discussions st> ec> > fi st> ec> > fi st> ec> > st> ec> > or something to that effect. st> ec> st> ec> This one might be better. st> ec> st> st> actually, this one should also have the netscape line before the 'else' st> so it will fire depening on either outcome. st> st> ec> > st> ec> > st> ec> > st> ec> > -- st> ec> > S.Toms - tomas@primenet.com - www.primenet.com/~tomas st> ec> > SuSE Linux v6.4+ - Kernel 2.2.16 st> ec> st> ec> Saludos, st> ec> Mezcalito st> ec> st> ec> st> ec> st> st> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.4+ - Kernel 2.2.16 Remember, UNIX spelled backwards is XINU. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq