aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/www-browser13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/www-browser b/bin/www-browser
index 38e99ef..8af1c36 100755
--- a/bin/www-browser
+++ b/bin/www-browser
@@ -10,9 +10,11 @@
#---------------------------------------------------------------
#
-# If we got any argument, we can call xdg-open
+# If we got any argument, we can call xdg-open, if we havenĀ“t already done it
#
-if [[ -n "$@" ]]; then
+if [ -n "$@" -a -z "$THROUGHXDG" ]; then
+ # Lock against bug #29599
+ export THROUGHXDG=1
exec xdg-open "$@"
fi
@@ -67,7 +69,12 @@ if [[ -z "$BROWSER" ]]; then
fi
if [[ -n "$BROWSER" ]]; then
- exec $BROWSER
+ if [[ -n "$THROUGHXDG" ]]; then
+ # xdg couldn't handle the url
+ exec $BROWSER $@
+ else
+ exec $BROWSER
+ fi
else
echo "no web browser detected"
fi