Re: config questions

Lars Torben Wilson (torben@coastnet.com)
28 May 1998 18:22:11 -0700


Stephen Davies <scldad@sdc.com.au> writes:

> > If netscape isn't available, lynx is automatically started.
> > 
> 
> However, if Netscape is already running, clicking the blue button causes an 
> error because it tries to start a second copy of Netscape rather than usingthe 
> already running copy.

I recently sent the following diff to the author of the afterstepdoc
script, which first tries sending a remote control command to
Netscape. I haven't heard back from him, so here's the diff in
question.

To apply, copy this to the directory with afterstepdoc, name it
e.g. asd.diff, and run

# patch -p1 < asd.diff

YMMV. Good luck,

Torben


--- afterstepdoc.orig Tue May 12 18:33:51 1998
+++ afterstepdoc Thu May 14 18:13:22 1998
@@ -1,6 +1,8 @@
 #!/bin/sh
 #
 # Copyright (C) 1998, Cristian Gafton <gafton@redhat.com>, GPL
+# Modified May 13, 1998,  Lars Torben Wilson <torben@netmill.com>
+#    - attempt to remotely start Netscape before starting a new NS process
 #
 # If netscape isn't available, run lynx in a xiterm
 # First try standard path, then local, then other possible paths
@@ -10,7 +12,10 @@
        /usr/local/bin/netscape /usr/local/netscape/netscape \
        /opt/netscape/netscape /opt/bin/netscape ; do
    if [ -x $netscape ] ; then
-       exec $netscape /usr/share/afterstep/doc/afterstep.html
+      $netscape -remote \
+        openurl\(file:///usr/share/afterstep/doc/afterstep.html\) 2>/dev/null \
+                 || $netscape /usr/share/afterstep/doc/afterstep.html &
+               exit
    fi
 done

--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://wormhole.eosys.com/mailing-lists/AfterStep-Info.html
   FAQ:   http://www.cs.purdue.edu/homes/zamboni/afterstep/FAQ.html

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