Comment 12 for bug 204858

Revision history for this message
Chris Cheney (ccheney) wrote : Re: sensible-browser should also use xdg-open for KDE support

The patch for this probably needs to either also patch xdg-open to not have a fallback case or use the code that xdg-open uses to detect Gnome/KDE/XFCE.

Then do something like

if test -n "$DISPLAY"; then
  if test -n "$GNOME_DESKTOP_SESSION_ID"; then
    xdg-open "$URL"
  elif test -n KDEtest; then
    xdg-open "$URL"
 elif test -n XFCEtest; then
   xdg-open "$URL"
  endif
    if test -x /usr/bin/x-www-browser; then
        exec /usr/bin/x-www-browser "$URL"
    elif test -x /usr/bin/x-terminal-emulator && test -x /usr/bin/www-browser; then
        exec /usr/bin/x-terminal-emulator -e /usr/bin/www-browser "$URL"
    fi
elif test -x /usr/bin/www-browser; then
    exec /usr/bin/www-browser "$URL"
fi