pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56092: libreoffice hard-codes a /usr/bin/xdg-open ref

>Number:         56092
>Category:       pkg
>Synopsis:       libreoffice hard-codes a /usr/bin/xdg-open ref
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 02 21:50:00 +0000 2021
>Originator:     Michael L. Riechers
>Release:        NetBSD 9.0_STABLE libreoffice-
Kind Regards, I am

 /s/ Michael L. Riechers

Michael L. Riechers,
Owner,					M L Riechers Systems Engineering
513/844-2220 (voice)			530 Main Street
513/205-5589 (cell)			Hamilton, Ohio 45013  (internet)  (WEB)

Systems Programming: The three most adverse malignancies in life are:
  1)signed numbers,  2)floating point numbers, and  3)little endians.

"Defend the Spirit of the Enlightenment."  Macron, 2017
System: NetBSD 9.0_STABLE NetBSD 9.0_STABLE (HOUSE-202006271630Z.9.0) #0: Sat Jul 4 16:51:05 EDT 2020 amd64
Architecture: x86_64
Machine: amd64
libreoffice hard-codes a /usr/bin/xdg-open (which doesn't exist) ref
instead of simply xdg-open in:

so, when these functions are called, hell breaks loose.


patch at:

diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
         if (std::getenv("LIBO_FLATPAK") != nullptr) {
         } else {
-            aBuffer.append("/usr/bin/xdg-open");
+            aBuffer.append("xdg-open");
         aBuffer.append(" ");
diff --git a/shell/source/unix/misc/ b/shell/source/unix/misc/
index 4519e01f26e2..8985711a2c01 100755
--- a/shell/source/unix/misc/
+++ b/shell/source/unix/misc/
@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
         elif [ -x /usr/bin/xdg-open ] ; then
+        elif type -p xdg-open >/dev/null 2>&1 ; then
+            MAILER="$(type -p xdg-open)"
             echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
             exit 2


Home | Main Index | Thread Index | Old Index