aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:19 -0500
committerJacek Antonelli2008-08-15 23:45:19 -0500
commitb235c59d60472f818a9142c0886b95a0ff4191d7 (patch)
treed323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/linux_tools/register_secondlifeprotocol.sh
parentSecond Life viewer sources 1.18.5.3 (diff)
downloadmeta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2
meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to 'linden/indra/newview/linux_tools/register_secondlifeprotocol.sh')
-rwxr-xr-xlinden/indra/newview/linux_tools/register_secondlifeprotocol.sh46
1 files changed, 46 insertions, 0 deletions
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 @@
1#!/bin/bash
2
3# Register a protocol handler (default: handle_secondlifeprotocol.sh) for
4# URLs of the form secondlife://...
5#
6
7HANDLER="$1"
8
9RUN_PATH=`dirname "$0" || echo .`
10cd "${RUN_PATH}"
11
12if [ -z "$HANDLER" ]; then
13 HANDLER=`pwd`/handle_secondlifeprotocol.sh
14fi
15
16# Register handler for GNOME-aware apps
17LLGCONFTOOL2=gconftool-2
18if which ${LLGCONFTOOL2} >/dev/null; then
19 (${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.
20else
21 echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found.
22fi
23
24# Register handler for KDE-aware apps
25if [ -z "$KDEHOME" ]; then
26 KDEHOME=~/.kde
27fi
28LLKDEPROTDIR=${KDEHOME}/share/services
29if [ -d "$LLKDEPROTDIR" ]; then
30 LLKDEPROTFILE=${LLKDEPROTDIR}/secondlife.protocol
31 cat > ${LLKDEPROTFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTFILE}
32[Protocol]
33exec=${HANDLER} '%u'
34protocol=secondlife
35input=none
36output=none
37helper=true
38listing=
39reading=false
40writing=false
41makedir=false
42deleting=false
43EOF
44else
45 echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTDIR does not exist.
46fi