summaryrefslogtreecommitdiff
path: root/shell/source/unix/exec/shellexec.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/unix/exec/shellexec.cxx')
-rw-r--r--shell/source/unix/exec/shellexec.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index cb9f2e53effe..7f12a80b76ef 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -37,6 +37,7 @@
#include "uno/current_context.hxx"
+#include <cstdlib>
#include <string.h>
#include <errno.h>
#include <unistd.h>
@@ -153,8 +154,11 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
aBuffer.append("open --");
#else
// Just use xdg-open on non-Mac
-
- aBuffer.append("/usr/bin/xdg-open");
+ if (std::getenv("LIBO_FLATPAK") != nullptr) {
+ aBuffer.append("/app/bin/xdg-open");
+ } else {
+ aBuffer.append("/usr/bin/xdg-open");
+ }
#endif
aBuffer.append(" ");
escapeForShell(aBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding()));