Description: Ideally, LibreOffice would look in the PATH for xdg-open and use it if found. If it can't find it in the PATH nor at /usr/bin/xdg-open, then it should display a reasonable error message via the GUI. Something like: "LibreOffice needs xdg-open to open links, but could not find it." This causes a problem for NixOS which doesn't install software under /usr, but uses symlinks to added packages to the PATH. I suppose this could also be a problem on other *nix distributions if a non-root user wants to use a custom xdg-open by adding it to a folder in the PATH before /usr/bin. (I put the earliest version affected to 5.3.0.3 since that is the earliest I've tested, but I'm sure the problem exists in earlier versions as well.) Steps to Reproduce: 1. Place xdg-open somewhere in your PATH, but not in /usr/bin/xdg-open 2. Launch LibreOffice Calc from a terminal emulator 3. Type a URL in a cell and hit the enter key 4. Hold down Ctrl and click the link. Actual Results: In the terminal emulator, the following message prints: sh: /usr/bin/xdg-open: No such file or directory No message is displayed to the user. Expected Results: LibreOffice should find xdg-open and use it to open the link, causing your default browser to pop up and load the page. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Created attachment 134083 [details] patch that makes LibreOffice look for xdg-open in the path This patch should solve the problem. Credit goes to Linus Heckemann for creating it. This patch also fixes the 'File > Send > Email Document' when xdg-open is in the PATH but not at /usr/bin/xdg-open
(In reply to lvernschrock from comment #1) > Created attachment 134083 [details] > patch that makes LibreOffice look for xdg-open in the path > > This patch should solve the problem. Credit goes to Linus Heckemann for > creating it. > > This patch also fixes the 'File > Send > Email Document' when xdg-open is in > the PATH but not at /usr/bin/xdg-open Please submit the patch via gerrit: https://wiki.documentfoundation.org/Development/gerrit https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch
Moving to NEW...
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear lvernschrock, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I submitted the patch now and attributed it to Linus Heckemann https://gerrit.libreoffice.org/c/core/+/110530
Part of this patch set won't necessarily behave as intended, depending on the OS. diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 4519e01f26e2..8985711a2c01 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 type -p xdg-open >/dev/null 2>&1 ; then + MAILER="$(type -p xdg-open)" else echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`" exit 2 This uses "type -p", but that's not portable. For example, with Debian's dash as /bin/sh: $ /bin/sh $ type -p xdg-open -p: not found xdg-open is /usr/bin/xdg-open $ echo $? 127 Or with NetBSD's /bin/sh (with newer than 8.0): $ /bin/sh $ type -p xdg-open type: usage: type name... $ echo $? 2 "command -v" is probably a better choice here.
(In reply to David H. Gutteridge from comment #7) > "command -v" is probably a better choice here. Thanks, I updated https://gerrit.libreoffice.org/c/core/+/110530 John also had some comments in the patch, so if someone could give feedback on those, it would be great.
I can offer the perspective of someone involved with downstream packaging (for NetBSD and others). One of our users hit this issue on NetBSD. BSDs as a rule don't install most third-party software to /usr/bin, they isolate it elsewhere by policy (with NetBSD, the default being /usr/pkg/bin, with most other BSDs, it's /usr/local/bin). So patches like these are welcomed. There is of course a risk with simply looking for xdg-open. Sometimes, what we do in this case is substitute our own (user-configurable at build time) paths over whatever the upstream software expects. I don't know if you want to deal with that additional complexity at your end. You're making a reasonable effort to find something appropriate already. I'd be inclined to prefer xdg-open over kde-open, as xdg-open is intended to be a standard/cross-desktop tool, and so I'd expect either it would be more commonly available by default (not with us, but with mainstream Linux distros), and probably a less complex external dependency. (That said, I don't know if the KDE version offers some advantage I don't know about.) Thanks, Dave
Linus Heckemann committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/85462ef7aed85bcfb0e0628c5252a07c369ff606 tdf#108591 Don't hardcode xdg-open path It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Create a symbolic link at /usr/bin/xdg-open pointing to its actual location. This maintains LibreOffice's expected path while allowing xdg-open to reside elsewhere. You can start playing any game right away in https://unblockedgames-76.io browser. There are no downloads required.