From b235c59d60472f818a9142c0886b95a0ff4191d7 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:19 -0500 Subject: Second Life viewer sources 1.18.6.0-RC --- .../linux_tools/register_secondlifeprotocol.sh | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 linden/indra/newview/linux_tools/register_secondlifeprotocol.sh (limited to 'linden/indra/newview/linux_tools/register_secondlifeprotocol.sh') diff --git a/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh b/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh new file mode 100755 index 0000000..4ab96f9 --- /dev/null +++ b/linden/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} <