3 # Call appropriate brower
5 # Copyright (c) 2001 Philipp Thomas <pthomas@suse.de>
7 # Borrowed heavily from url_handler.sh by Werner Fink <werner@suse.de>
13 if test "$url" = "$method" ; then
15 */*.htm|
*/*.html
) method
=http
;;
16 */*.htmls
) method
=https
;;
17 /*) if test -r "${url}" ; then
20 *) if test -r "$PWD/${url}" ; then
27 file) url
="${method}:$url" ;;
28 *) url
="${method}://$url" ;;
37 type -p lynx
>& /dev
/null
&& http
=lynx
38 type -p links
>& /dev
/null
&& http
=links
39 type -p w3m
>& /dev
/null
&& http
=w3m
40 test -n "$DISPLAY" && type -p netscape
>& /dev
/null
&& http
=netscape
41 test -n "$DISPLAY" && type -p Netscape
>& /dev
/null
&& http
=Netscape
42 test -n "$DISPLAY" && type -p opera
>& /dev
/null
&& http
=opera
43 test -n "$DISPLAY" && type -p mozilla
>& /dev
/null
&& http
=mozilla
45 [nN
]etscape|opera|mozilla
) ($http -remote "openURL($url)" ||
$http "$url") >/dev
/null
2>&1 & ;;
46 lynx|w3m|links
) exec $http "$url" ;;
48 echo "No HTTP browser found."
49 read -p "Press return to continue: "
50 exit 0 # No error return
55 echo "URL type \"$method\" not known"
56 read -p "Press return to continue: "
57 exit 0 # No error return