Hmmm....
> Indeed - for one thing it's guess wrong on multiuser machines.

You are correct. I did change it to ps axu but then the names got truncated
and nothing was found!

It turns out not to matter much. Even if another user is logged on (this is
a multiuser machine) the netscape script seems to overlook that error and
starts up a copy of netscape, anyway. I guess I wrote that script when
nobody else was logged on with netscape. But, the important thing is, it works.

It is true that netscape is a script, but this script seems to be part
of the linux netscape distribution. I am using Caldera. Naturally,
I wrote my script to work with the netscape startup script. Since you have
to pass the entire command to the script, with quotes, I guess the single
quotes were necessary.

Joel


On Mon, May 13, 2002 at 09:27:43AM +1000, Cameron Simpson wrote:
> On 08:49 12 May 2002, Joel Hammer <[EMAIL PROTECTED]> wrote:
> | I use xclick, but not just with mutt. I have a netscape icon on my control
> | panel with the following executable property:
> | 
> | /usr/local/bin/DisplayHTML
> | 
> | The program DisplayHTML is as follows:
> | 
> | #!/bin/bash
> | a=`ps ax | grep mozilla | grep -v grep`
> | [ -n "$a" ] && {
> |             netscape '-remote "openURL($1)"'
> |      }
> | [ -z "$a" ] && {
> |             netscape "$1"
> |                 }     
> | 
> | The ps stuff is to see if a version of netscape is already
> | running, and if so, don't start a new netscape session.
> | Depending on your browser, you may have to modify this script. 
> 
> Indeed - for one thing it's guess wrong on multiuser machines.
> Also, wouldn't an if be more succint:
> 
>       if [ -n "$a" ]
>       then  netscape '-remote "openURL($1)"'
>       else  netscape "$1"
>       fi
> 
> ? And surely this doesn't work. The quoting's wrong. This:
> 
>       netscape '-remote "openURL($1)"'
> 
> should really be this:
> 
>       netscape -remote "openURL($1)"
> 
> Oh, I get it - you're surviving because on RedHat, the "netscape" command is
> itself a script which grossly buggers the quoting, undoing your misquoting.
> Scarey :-)
> -- 
> Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/
> 
> What's a pencil? Is that like a PDA stylus?
>       - [EMAIL PROTECTED] (Elizabeth Schwartz)

Reply via email to