Add support for xdg-open.

This commit is contained in:
Aleric Inglewood
2013-02-27 17:22:10 +01:00
parent 13e032fb04
commit 186c3ef88a

View File

@@ -45,6 +45,18 @@ if [ ! -z "$XBROWSER" ]; then
echo "$0: Trying some others..."
fi
# Launcher for any desktop.
if which xdg-open >/dev/null; then
xdg-open "$URL"
case $? in
0) exit ;;
1) echo "xdg-open: Error in command line syntax." ;;
2) echo "xdg-open: One of the files passed on the command line did not exist." ;;
3) echo "xdg-open: A required tool could not be found." ;;
4) echo "xdg-open: The action failed." ;;
esac
fi
# Launcher the default GNOME browser.
if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ] && which gnome-open >/dev/null; then
gnome-open "$URL" &