Description: When in a strictly confined snap, use the xdg-open shim provided by the core snap.
Bug-Ubuntu: https://launchpad.net/bugs/1665106
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
--- a/shell/source/unix/exec/shellexec.cxx
+++ a/shell/source/unix/exec/shellexec.cxx
@@ -149,6 +149,8 @@ void SAL_CALL ShellExec::execute( const
// Just use xdg-open on non-Mac
if (std::getenv("LIBO_FLATPAK") != nullptr) {
aBuffer.append("/app/bin/xdg-open");
+ } else if (std::strcmp(std::getenv("SNAP_NAME"), "libreoffice") == 0) {
+ aBuffer.append("/usr/local/bin/xdg-open");
} else {
aBuffer.append("/usr/bin/xdg-open");
}