David,
Thanks for your script :) However, I'm getting the following error
messages:
Executing: openurl
'http://washingtonpost.com/cgi-bin/gx.cgi/AppLogic+FTContentServer?pagename=wpni/print&articleid=A64933-2000Mar2'...
/home/john/bin/openurl: =: command not found
/home/john/bin/openurl: die: command not found
/home/john/bin/openurl: =/home/john: No such file or directory
/home/john/bin/openurl: syntax error near unexpected token
`open(STDOUT,'
/home/john/bin/openurl: /home/john/bin/openurl: line 14: `
open(STDOUT, ">/dev/null");
My ~/.urlview is set up as you suggested below
What am I doing wrong?
Thanks.
John
On Fri, Mar 03, 2000 at 01:21:24PM -0600, David DeSimone wrote:
> John P. Verel <[EMAIL PROTECTED]> wrote:
> >
> > Question: How to get to launch Netscape if not open and/or same
> > question for lynx?
>
> Here's my entry:
>
> ~/.urlview:
>
> REGEXP ((https?|ftp)://|www\.)[-a-z_0-9@#$%&+=:;'~,./?]+[a-z_0-9/]
> COMMAND openurl
>
> ~/bin/openurl:
> #!/usr/bin/perl
>
> ($url = shift) || die "Usage: openurl http://www.somewhere.com/whatever\n";
>
> $url =~ s/,/%2c/g; # URL's with commas cause trouble.
>
> if ($ENV{'DISPLAY'})
> {
> fork && exit;
>
> if (! fork)
> {
> open(STDOUT, ">/dev/null");
> open(STDERR, ">&STDOUT");
>
> exec "netscape", "-noraise", "-remote", "openURL($url,newwindow)";
> exit $!;
> }
>
> wait;
>
> if ($?)
> {
> exec "netscape", $url;
> die "netscape: $!\n";
> }
> }
> else
> {
> exec "lynx", $url;
> die "lynx: $!\n";
> }
>
> --
> David DeSimone | "The doctrine of human equality reposes on this:
> [EMAIL PROTECTED] | that there is no man really clever who has not
> Hewlett-Packard | found that he is stupid." -- Gilbert K. Chesterson
> UX WTEC Engineer | PGP: 5B 47 34 9F 3B 9A B0 0D AB A6 15 F1 BB BE 8C 44