On Wed, Mar 13, 2002 at 10:09:09PM -0500, Joel Hammer wrote:
> I use mutt, linux, and kde.
> One of the problems I have had with mutt is opening links to internet sites
> in my email.
> I used to highlight and copy the address into the browser (netscape). But,
> this seems a bit clumsy. It was clumsy, in fact.
> So, I have a better way now. I thought I would pass this along and get some
> comments and some advice.
> Given a script called /usr/local/bin/DisplayHTML
> 
> #!/bin/bash
> a=`ps axu | grep mozilla | grep -v grep`  <--look for mozilla in my user's name
> [ -n "$a" ] && {  <--If running use this command, else the one below
>             /usr/local/netscape/netscape -remote "openURL($1)" &
>      }
> [ -z "$a" ] && {
>             /usr/local/netscape/netscape "$1" &
>               }

A much simpler way to do this is:

    netscape -remote "openURL($1, new-window)" 2> /dev/null || netscape $1

If netscape is not already running, the first command will fail and then
the second command will be executed.

> Is there a way to run a shell script which would automatically read in
> the current contents of the clipboard, thus avoiding the need for the
> mouse click?

I used to have a program that did this on an earlier version of HP-UX,
so it is possible.  It just echoed the clipboard contents to stdout.  I
don't think I have it any more, though, so you might see if freshmeat
has one.

As an alternative to urlview, you might try w3m.  It's a text-based web
browser and pager.  When used as a pager, you can have it highlight URLs
and then open them using w3m itself or an external browser such as
netscape.  For a little more detail, see
http://www.spocom.com/users/gjohnson/mutt/#w3m

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to