diff options
author | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
commit | b235c59d60472f818a9142c0886b95a0ff4191d7 (patch) | |
tree | d323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/linux_tools/register_secondlifeprotocol.sh | |
parent | Second Life viewer sources 1.18.5.3 (diff) | |
download | meta-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-x | linden/indra/newview/linux_tools/register_secondlifeprotocol.sh | 46 |
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 | |||
7 | HANDLER="$1" | ||
8 | |||
9 | RUN_PATH=`dirname "$0" || echo .` | ||
10 | cd "${RUN_PATH}" | ||
11 | |||
12 | if [ -z "$HANDLER" ]; then | ||
13 | HANDLER=`pwd`/handle_secondlifeprotocol.sh | ||
14 | fi | ||
15 | |||
16 | # Register handler for GNOME-aware apps | ||
17 | LLGCONFTOOL2=gconftool-2 | ||
18 | if 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. | ||
20 | else | ||
21 | echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found. | ||
22 | fi | ||
23 | |||
24 | # Register handler for KDE-aware apps | ||
25 | if [ -z "$KDEHOME" ]; then | ||
26 | KDEHOME=~/.kde | ||
27 | fi | ||
28 | LLKDEPROTDIR=${KDEHOME}/share/services | ||
29 | if [ -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] | ||
33 | exec=${HANDLER} '%u' | ||
34 | protocol=secondlife | ||
35 | input=none | ||
36 | output=none | ||
37 | helper=true | ||
38 | listing= | ||
39 | reading=false | ||
40 | writing=false | ||
41 | makedir=false | ||
42 | deleting=false | ||
43 | EOF | ||
44 | else | ||
45 | echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTDIR does not exist. | ||
46 | fi | ||