Description: Prefer xdg-open and x-www-browser for HTML browser.
Author: Francesco Paolo Lovergine <frankie@debian.org>

--- a/lib/init/init.sh
+++ b/lib/init/init.sh
@@ -350,53 +350,13 @@ fi
 
 # try and find a web browser if one isn't already specified
 if [ ! "$GRASS_HTML_BROWSER" ] ; then
-
-    if [ "$MACOSX" ] ; then
-        # OSX doesn't execute browsers from the shell PATH - route thru a script
-        GRASS_HTML_BROWSER="$ETC/html_browser_mac.sh"
-        GRASS_HTML_BROWSER_MACOSX="-b com.apple.helpviewer"
-        export GRASS_HTML_BROWSER_MACOSX
-
-    elif [ "$MINGW" -o "$CYGWIN" ] ; then
-	# MinGW startup moved to into init.bat
-	iexplore="$SYSTEMDRIVE/Program Files/Internet Explorer/iexplore.exe"
-	if [ -f "$iexplore" ] ; then
-	    GRASS_HTML_BROWSER=$iexplore
-	else
-	    GRASS_HTML_BROWSER="iexplore"
-	fi
-
-    else
-      # the usual suspects
-      BROWSERS="htmlview konqueror mozilla mozilla-firefox firefox opera netscape dillo"
-      for BROWSER in $BROWSERS ; do
-	for i in `echo "$PATH" | sed 's/^:/.:/
-                                s/::/:.:/g
-                                s/:$/:./
-                                s/:/ /g'`
-	do
-	  if [ -f "$i/$BROWSER" ] ; then  
-            GRASS_HTML_BROWSER="$BROWSER"
-            break
-	  fi
-	done
-	if [ -n "$GRASS_HTML_BROWSER" ] ; then
-	   break
+	if [ -x /usr/bin/xdg-open ] ; then
+		GRASS_HTML_BROWSER=xdg-open
+	elif [ -x /usr/bin/x-www-browser ] ; then
+		GRASS_HTML_BROWSER=x-www-browser
+	else 
+		GRASS_HTML_BROWSER=true
 	fi
-      done
-    fi
-   
-elif [ "$MACOSX" ] ; then
-    # OSX doesn't execute browsers from the shell PATH - route thru a script
-    GRASS_HTML_BROWSER_MACOSX="-b $GRASS_HTML_BROWSER"
-    export GRASS_HTML_BROWSER_MACOSX
-    GRASS_HTML_BROWSER="$ETC/html_browser_mac.sh"
-fi
-
-if [ ! "$GRASS_HTML_BROWSER" ] ; then
-    echo "WARNING: Searched for a web browser, but none found." 1>&2
-    # even so we set konqueror to make lib/gis/parser.c happy:
-    GRASS_HTML_BROWSER=konqueror
 fi
 export GRASS_HTML_BROWSER
 
