afterstepdoc

Andrew Edelstein (andrew@pure-chaos.com)
Mon, 29 Jun 98 20:53:13 +0200



--oC1+HKm2/end4ao3
Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/"


--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii

If you click on the afterstep doc button in the default wharf, it runs
/usr/bin/afterstepdoc, which first looks to see if you have netscape and
launches it, loading the AfterStep documentation file from your hard drive. If
you don't have Netscape, it runs Lynx instead.
The problem is, if you have Netscape, and you already have a Netscape session
running, it will complain that there is already a ~/.netscape/lock file, etc.

This was highly annoying, since I have Netscape running 90% of the time when
I'm logged in. I have modified /usr/bin/afterstepdoc (attached) such that
after testing for the existence of Netscape on your machine, it will then
check to see if it is already runnning. If it is not running, it will proceed
as before. If it IS running, it will then use Netscapes -remote option to tell
your running session to load the docs in a new window (so as not to disturb
whatever you were already doing in your original window.)

I submit this for inclusion in the next update to AS. I'm sure there are more
elegent ways of testing to see if Netscape is already running, and I welcome
any suggestions (I'm a beginning shell hacker.)

-- 
Andrew Edelstein

Sarah - Doctor, you're being a child.
The Doctor - Why shouldn't I? There's no point in being an adult if you can't
act childish now and then.		Dr. Who

--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=afterstepdoc

#!/bin/sh
#
# Copyright (C) 1998, Cristian Gafton <gafton@redhat.com>, GPL
#
# If netscape isn't available, run lynx in a xiterm
# First try standard path, then local, then other possible paths
#

for netscape in /usr/X11R6/bin/netscape /usr/bin/netscape \
       /usr/local/bin/netscape /usr/local/netscape/netscape \
       /opt/netscape/netscape /opt/bin/netscape ; do
   if [ -x $netscape ] ; then
	if [ -f /usr/ucb/ps ]; then
		PS=`/usr/ucb/ps | grep netscape | grep -v grep`
		else
		PS=`ps | grep netscape | grep -v grep`
	fi
   if [ $PS ]; then
       exec $netscape -noraise -remote
'openFILE(/usr/share/afterstep/doc/afterstep.html,new-window)'
	else
	exec $netscape /usr/share/afterstep/doc/afterstep.html
   fi
done

for lynx in /usr/bin/lynx /bin/lynx /usr/local/bin/lynx ; do
    if [ -x $lynx ] ; then
       exec xiterm -bg black -fg peachpuff -sl 500 -vb -e "$lynx
/usr/share/afterstep/doc/afterstep.html"
    fi
done

--TB36FDmn/VVEgNH/--

--oC1+HKm2/end4ao3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
MessageID: slKheoBANtb3k9/LsdkJxIbwBpd7NAUm

iQCVAwUBNZfwpBFsf0n9SKQJAQGosgQAoeTGlzZcDkLfjuJnrqOOZvR/Cv9JBHw2
pVvj2mFUBDQ2XM+ZX7nNyp/erqurFv129vUIKQrcIur5MYXBhpPRkEEsz07SyIc6
R8zRb1YN+3LFvLT3tru7RHMP2ggsACyKIRvWTGK1p5yedAcPpaUQ8AB95lG7cZ1o
eHm5dtg9IaM=
=6BRk
-----END PGP SIGNATURE-----

--oC1+HKm2/end4ao3--

--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://wormhole.eosys.com/mailing-lists/AfterStep-Info.html

   To unsubscribe: echo unsubscribe | mail afterstep-request@eosys.com


--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://wormhole.eosys.com/mailing-lists/AfterStep-Info.html

   To unsubscribe: echo unsubscribe | mail afterstep-request@eosys.com