From 2f6c7606241acdf800a2c079b359e7a1db360954 Mon Sep 17 00:00:00 2001 From: Tess Chu Date: Tue, 20 Nov 2007 02:53:43 +0000 Subject: svn merge -r 73926:74098 svn+ssh://svn/svn/linden/branches/viewer-auth-7 --- .../linux_tools/handle_secondlifeprotocol.sh | 17 ++++++++ .../linux_tools/register_secondlifeprotocol.sh | 46 ++++++++++++++++++++++ indra/newview/linux_tools/wrapper.sh | 4 ++ 3 files changed, 67 insertions(+) create mode 100755 indra/newview/linux_tools/handle_secondlifeprotocol.sh create mode 100755 indra/newview/linux_tools/register_secondlifeprotocol.sh (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/handle_secondlifeprotocol.sh b/indra/newview/linux_tools/handle_secondlifeprotocol.sh new file mode 100755 index 0000000000..7ff86d1b93 --- /dev/null +++ b/indra/newview/linux_tools/handle_secondlifeprotocol.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Send a URL of the form secondlife://... to Second Life. +# + +URL="$1" + +if [ -z "$URL" ]; then + echo Usage: $0 secondlife://... + exit +fi + +RUN_PATH=`dirname "$0" || echo .` +cd "${RUN_PATH}" + +exec ./secondlife -url \'"${URL}"\' + diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh new file mode 100755 index 0000000000..4ab96f97d6 --- /dev/null +++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Register a protocol handler (default: handle_secondlifeprotocol.sh) for +# URLs of the form secondlife://... +# + +HANDLER="$1" + +RUN_PATH=`dirname "$0" || echo .` +cd "${RUN_PATH}" + +if [ -z "$HANDLER" ]; then + HANDLER=`pwd`/handle_secondlifeprotocol.sh +fi + +# Register handler for GNOME-aware apps +LLGCONFTOOL2=gconftool-2 +if which ${LLGCONFTOOL2} >/dev/null; then + (${LLGCONFTOOL2} -s -t string /desktop/gnome/url-handlers/secondlife/command "${HANDLER} \"%s\"" && ${LLGCONFTOOL2} -s -t bool /desktop/gnome/url-handlers/secondlife/enabled true) || echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} failed. +else + echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found. +fi + +# Register handler for KDE-aware apps +if [ -z "$KDEHOME" ]; then + KDEHOME=~/.kde +fi +LLKDEPROTDIR=${KDEHOME}/share/services +if [ -d "$LLKDEPROTDIR" ]; then + LLKDEPROTFILE=${LLKDEPROTDIR}/secondlife.protocol + cat > ${LLKDEPROTFILE} <