3 # tries to locate the executable specified
4 # as first parameter in the user's path.
7 for i
in `echo $PATH | sed -e 's/^:/.:/g' -e 's/:$/:./g' -e 's/::/:.:/g' -e 's/:/ /g'`; do
8 if [ -x "$i/$1" -a ! -d "$i/$1" ]; then
16 # checks for the original mozilla start script(s)
17 # and restrict the "-remote" semantics to those.
19 if file "$1" |
grep "script" > /dev
/null
&& grep "NPL" "$1" > /dev
/null
; then
20 "$1" -remote 'ping()' 2>/dev
/null
>/dev
/null
24 "$1" -remote "openURL($2, new-window)" &
31 # checks the browser value for a %s as defined in
32 # http://www.catb.org/~esr/BROWSER/index.html
38 if (index($1,"%s") > 0) {
39 $syscmd=sprintf($1,$2);
41 $syscmd=sprintf("%s \"%s\"",$1,$2);
47 # special handling for mailto: uris
48 if echo $1 |
grep '^mailto:' > /dev
/null
; then
49 # check $MAILER variable
50 if [ ! -z "$MAILER" ]; then
54 # mozilla derivates may need -remote semantics
55 for i
in thunderbird mozilla netscape
; do
57 if [ ! -z "$mailer" ]; then
58 run_mozilla
"$mailer" "$1"
62 # handle all non mozilla mail clients below
66 # check $BROWSER variable
67 if [ ! -z "$BROWSER" ]; then
71 # mozilla derivates may need -remote semantics
72 for i
in firefox mozilla netscape
; do
74 if [ ! -z "$browser" ]; then
75 run_mozilla
"$browser" "$1"
79 # handle all non mozilla browers below