From 186c3ef88ab3ba95a36d350017986b850c024cfa Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 27 Feb 2013 17:22:10 +0100 Subject: [PATCH] Add support for xdg-open. --- indra/newview/linux_tools/launch_url.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh index 404ea36f2..c528ee762 100755 --- a/indra/newview/linux_tools/launch_url.sh +++ b/indra/newview/linux_tools/launch_url.sh @@ -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" &