Subject: url-viewers feature

From: Birl <[email-masked]>
Date: Fri, 15 Aug 2003 10:08:40 -0400 (EDT)

I have my Pine 4.55 setup with:
  url-viewers = /usr/dt/bin/netscape

But it never runs in the background.  I cannot append the & to the end.
Anyway to get url-viewers to run the background?

Thanks.
Birl
-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Ed Arnold <[email-masked]>
Date: Tue, 19 Aug 2003 10:22:29 -0600 (MDT)

> Anyway to get url-viewers to run the background?

We've kicked this solution around on -discussion.  My .pinerc
reads:

url-viewers=/fs/scd/home0/era/bin/ns7

The "ns7" script invokes netscape7 into the background.  The baroque
"if" tests are left over from netscape4 and probably don't work
correctly for netscape7, er, mozilla.

#!/bin/sh
# short script to invoke netscape7 from within pine as a background
# process, so pine can continue.  Only arg is the URL.
# Author: Ed Arnold <[email-masked]> , but modified by Mike Miller & John
# Soper
NETSCAPE=/fs/local/bin/netscape7
URL=`echo $1 | sed 's/,/%2C/g'`

#
# handle viewing HTML attachment or message files
#
ATTACH=`echo $URL | grep /tmp/img-HTM | wc -l`
if [ $ATTACH = 1 ]; then
    cp $URL ${URL}.html
    URL=${URL}.html
fi

trap "" 1 2 3 13 15 18          # nohup blows
LOCK=`/bin/find $HOME/.mozilla -name lock -print`
if [ -h "$LOCK" ]; then
   cmd="$NETSCAPE -noraise -remote openURL($URL)"
   $cmd &
else
   cmd="$NETSCAPE $URL"
   $cmd &
fi

---

From: Birl <[email-masked]>
Date: Mon, 25 Aug 2003 14:35:23 -0400 (EDT)

As it was written on Aug 19, thus Ed Arnold spake unto Pine Discussion Forum:

era:  Date: Tue, 19 Aug 2003 10:22:29 -0600 (MDT)
era:  From: Ed Arnold <[email-masked]>
era:  To: Pine Discussion Forum <[email-masked]>
era:  Subject: Re: url-viewers feature
era:
era:  On Fri, 15 Aug 2003, Birl wrote:
era:
era:  > I have my Pine 4.55 setup with:
era:  >   url-viewers = /usr/dt/bin/netscape
era:  >
era:  > But it never runs in the background.  I cannot append the & to the end.
era:  > Anyway to get url-viewers to run the background?
era:  >
era:  >
era:  >
era:  > Thanks.
era:  > Birl

Wow seems like quite a bit:

I should give it shot.  You covered areas I wouldnt of have thought of
(like if the lock file exists).

Thanks!

era:  We've kicked this solution around on -discussion.  My .pinerc
era:  reads:
era:
era:  url-viewers=/fs/scd/home0/era/bin/ns7
era:
era:  The "ns7" script invokes netscape7 into the background.  The baroque
era:  "if" tests are left over from netscape4 and probably don't work
era:  correctly for netscape7, er, mozilla.
era:
era:  #!/bin/sh
era:  # short script to invoke netscape7 from within pine as a background
era:  # process, so pine can continue.  Only arg is the URL.
era:  # Author: Ed Arnold <[email-masked]> , but modified by Mike Miller & John
era:  # Soper
era:  NETSCAPE=/fs/local/bin/netscape7
era:  URL=`echo $1 | sed 's/,/%2C/g'`
era:
era:  #
era:  # handle viewing HTML attachment or message files
era:  #
era:  ATTACH=`echo $URL | grep /tmp/img-HTM | wc -l`
era:  if [ $ATTACH = 1 ]; then
era:      cp $URL ${URL}.html
era:      URL=${URL}.html
era:  fi
era:
era:  trap "" 1 2 3 13 15 18          # nohup blows
era:  LOCK=`/bin/find $HOME/.mozilla -name lock -print`
era:  if [ -h "$LOCK" ]; then
era:     cmd="$NETSCAPE -noraise -remote openURL($URL)"
era:     $cmd &
era:  else
era:     cmd="$NETSCAPE $URL"
era:     $cmd &
era:  fi