diff options
author | Linus Heckemann <linus.heckemann@sphalerite.org> | 2021-02-07 12:55:24 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-28 11:25:25 +0200 |
commit | 85462ef7aed85bcfb0e0628c5252a07c369ff606 (patch) | |
tree | 9f5d113bc80367a517f7dec93658e0b22793e31b /shell | |
parent | 6ca67de9426602234914ca0237083f57944f5764 (diff) |
tdf#108591 Don't hardcode xdg-open path
Change-Id: I6f32433284948e42798c3535db64b4ad48295d35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110530
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/unix/exec/shellexec.cxx | 2 | ||||
-rwxr-xr-x | shell/source/unix/misc/senddoc.sh | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 014782e62d27..87b78fe1d882 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -173,7 +173,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar aBuffer.append(" --"); #else // Just use xdg-open on non-Mac - aBuffer.append("/usr/bin/xdg-open"); + aBuffer.append("xdg-open"); #endif aBuffer.append(" "); escapeForShell(aBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding())); diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 394087156a74..d4f9b08de89c 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -393,6 +393,8 @@ case $(basename "$MAILER" | sed 's/-.*$//') in MAILER=/usr/bin/kde-open elif [ -x /usr/bin/xdg-open ] ; then MAILER=/usr/bin/xdg-open + elif command -v xdg-open >/dev/null 2>&1 ; then + MAILER=$(command -v xdg-open) else echo "Unsupported mail client: $(basename $MAILER | sed 's/-.*^//')" exit 2 |