#!/bin/sh

# htmlview - show a html file with the default browser
if command -v xdg-open &> /dev/null;
then
    xdg-open "$1"
elif command -v firefox &> /dev/null;
then
    firefox "$1"
elif [ "$GNOME_DESKTOP_SESSION_ID" = "Default" ] 
then
    gnome-open "$1"
elif [ "$KDE_FULL_SESSION" = "true" ]
then
    kfmclient exec "$1"
elif command -v exo-open &> /dev/null;
then
    exo-open --launch WebBrowser "$1"
else
      echo "Cannot detect default browser"
fi
