cmcfixes74: #i111960 use xdg-open when available
This commit is contained in:
parent
5a13b18d8a
commit
ac7fee6151
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# use gnome-open utility coming with libgnome if available
|
||||
gnome-open "$1" 2>/dev/null || "$0.bin" $1
|
||||
# use xdg-open or gnome-open if available
|
||||
xdg-open "$1" 2>/dev/null || gnome-open "$1" 2>/dev/null || "$0.bin" $1
|
||||
|
||||
exit 0
|
||||
|
@ -46,11 +46,17 @@ run_browser() {
|
||||
|
||||
# special handling for mailto: uris
|
||||
if echo $1 | grep '^mailto:' > /dev/null; then
|
||||
# check for xdg-email
|
||||
mailer=`which xdg-email`
|
||||
if [ ! -z "$mailer" ]; then
|
||||
$mailer "$1" &
|
||||
exit 0
|
||||
fi
|
||||
# check $MAILER variable
|
||||
if [ ! -z "$MAILER" ]; then
|
||||
$MAILER "$1" &
|
||||
exit 0
|
||||
else
|
||||
fi
|
||||
# mozilla derivates may need -remote semantics
|
||||
for i in thunderbird mozilla netscape; do
|
||||
mailer=`which $i`
|
||||
@ -61,13 +67,18 @@ if echo $1 | grep '^mailto:' > /dev/null; then
|
||||
done
|
||||
# handle all non mozilla mail clients below
|
||||
# ..
|
||||
fi
|
||||
else
|
||||
# check for xdg-open
|
||||
browser=`which xdg-open`
|
||||
if [ ! -z "$browser" ]; then
|
||||
$browser "$1" &
|
||||
exit 0
|
||||
fi
|
||||
# check $BROWSER variable
|
||||
if [ ! -z "$BROWSER" ]; then
|
||||
$BROWSER "$1" &
|
||||
exit 0
|
||||
else
|
||||
fi
|
||||
# mozilla derivates may need -remote semantics
|
||||
for i in firefox mozilla netscape; do
|
||||
browser=`which $i`
|
||||
@ -78,6 +89,5 @@ else
|
||||
done
|
||||
# handle all non mozilla browers below
|
||||
# ..
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user