diff options
author | Bryan Quigley <gquigs@gmail.com> | 2016-01-06 15:11:09 -0500 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-03-02 16:19:27 +0000 |
commit | cafd3adcbaa6714dc3674788401cf0f58fbbcb5e (patch) | |
tree | 869887be67d97d6bd0a838ffeea1d42109a8c5ae /shell/source/unix/misc/open-url.sh | |
parent | configure: try to make --without-x less confusing (diff) | |
download | core-cafd3adcbaa6714dc3674788401cf0f58fbbcb5e.tar.gz core-cafd3adcbaa6714dc3674788401cf0f58fbbcb5e.zip |
Just use xdg-open
Remove kde4/tde/open-url.sh and have LO just use xdg-open.
It's available on TDE builds as well as any recent KDE. We recently
did this just for gnome-open-url and have had no reported issues.
Change-Id: I4e1ee6caef368051af92023fa382b6fed9d9397e
Reviewed-on: https://gerrit.libreoffice.org/21173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'shell/source/unix/misc/open-url.sh')
-rwxr-xr-x | shell/source/unix/misc/open-url.sh | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/shell/source/unix/misc/open-url.sh b/shell/source/unix/misc/open-url.sh deleted file mode 100755 index 72aa566e9aa9..000000000000 --- a/shell/source/unix/misc/open-url.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -# tries to locate the executable specified -# as first parameter in the user's path. -which() { - if [ ! -z "$1" ]; then - for i in `echo $PATH | sed -e 's/^:/.:/g' -e 's/:$/:./g' -e 's/::/:.:/g' -e 's/:/ /g'`; do - if [ -x "$i/$1" -a ! -d "$i/$1" ]; then - echo "$i/$1" - break; - fi - done - fi -} - -# checks for the original mozilla start script(s) -# and restrict the "-remote" semantics to those. -run_mozilla() { - if file "$1" | grep script > /dev/null && grep NPL "$1" > /dev/null; then - "$1" -remote 'ping()' 2>/dev/null >/dev/null - if [ $? -eq 2 ]; then - "$1" "$2" & - else - "$1" -remote \ - "openURL($(printf '%s' "$2" \ - | sed -e 's/(/%28/g' -e 's/)/%29/g' -e 's/,/%2C/g'),new-window)" & - fi - else - "$1" "$2" & - fi -} - -# special handling for mailto: uris -if echo "$1" | grep '^mailto:' > /dev/null; then - # check for xdg-email - mailer=`which xdg-email` - if [ ! -z "$mailer" ]; then - $mailer "$1" & - exit 0 - fi - # check $MAILER variable - if [ ! -z "$MAILER" ]; then - $MAILER "$1" & - exit 0 - fi - # mozilla derivates may need -remote semantics - for i in thunderbird mozilla netscape icedove iceape; do - mailer=`which $i` - if [ ! -z "$mailer" ]; then - run_mozilla "$mailer" "$1" - exit 0 - fi - done - # handle all non mozilla mail clients below - # .. -else - # check for xdg-open - browser=`which xdg-open` - if [ ! -z "$browser" ]; then - $browser "$1" & - exit 0 - fi - # check $BROWSER variable - if [ ! -z "$BROWSER" ]; then - $BROWSER "$1" & - exit 0 - fi - # mozilla derivates may need -remote semantics - for i in chrome seamonkey firefox iceweasel iceape; do - browser=`which $i` - if [ ! -z "$browser" ]; then - run_mozilla "$browser" "$1" - exit 0 - fi - done - # handle all non mozilla browsers below - # .. -fi -exit 1 |