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