[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-users
Subject:    Re: Mutt/Netscape eludes me
From:       David Champion <dgc () uchicago ! edu>
Date:       2001-03-17 19:34:15
[Download RAW message or body]

On 2001.03.15, in <20010315140154.C634@mthoodmedia.com>,
	"Zach Thompson" <zach@mthoodmedia.com> wrote:
> 
> It tells netsacpe to launch the url in a pre-existing window - the id that we
> just found in netscape.sh.

Alternatively:

	netscape -remote 'openURL(http://www.foo.net/, mutt-ns)'

will open http://www.foo.net/ in a netscape window with the name
"mutt-ns".  (Each NS windows may have an internally-associated name.)
If mutt-ns does not exist, it will be launched as a new window.

If the comma and window name are not present, the default NS window
will be used.  You just have to have NS running already.  (This is a
behavioral change from the original implementation of the -remote
interface -- NS 3.0, maybe 2.0? -- where a -remote command would start
Netscape if it was not running already.)

So, you could test for Netscape's being mapped with
	xlswins | grep Netscape

then start netscape if that fails, and wait for it to map before simply
using the -remote command.  Something like:

#!/bin/sh

## uncomment to use a separate window for urlview/mutt
#WINDOW=", mutt-ns"

not () {
	if "$@"; then
		false
	else
		true
	fi
}
ns_mapped () {
	xlswins | grep Netscape: >/dev/null
}

if not ns_mapped; then
	netscape &
fi

while not ns_mapped; do
	## Should have a check here in case netscape never maps for some reason
	sleep 2
done

netscape -remote "openURL($1$WINDOW)"


That should approximately work.  I use lynx or w3m, so I'm not
completely sure.

Zach, your config is weird.  You're sending to mutt-users, but it's not
in the header, so responses to your mail don't go the list by default.

-- 
 -D.	dgc@uchicago.edu	NSIT	University of Chicago

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic