#! /bin/sh /usr/share/dpatch/dpatch-run ## www-browser.dpatch by Hamish Bowman ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Use www-browser as HTML browser, the Debian way @DPATCH@ diff -urNad grass6_devel/lib/init/init.sh.6.4svn grass6_devel/lib/init/init.sh --- grass6_devel/lib/init/init.sh.ORIG 2008-10-31 02:26:25.000000000 +1300 +++ grass6_devel/lib/init/init.sh 2008-10-31 02:16:53.000000000 +1300 @@ -315,53 +315,11 @@ # 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/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