Bug 111436 - Allow external tools to interact with LibreOffice running inside Flatpak, include Java JARs
Summary: Allow external tools to interact with LibreOffice running inside Flatpak, inc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: http://discourse.jabref.org/t/support...
Whiteboard:
Keywords:
Depends on:
Blocks: LibreOffice-Flatpak
  Show dependency treegraph
 
Reported: 2017-08-07 14:44 UTC by Dennis Schridde
Modified: 2021-08-13 03:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2017-08-07 14:44:24 UTC
External tools like JabRef [1] support integrating with LibreOffice [2].  However, this is broken when LibreOffice is installed as a Flatpak, the first problem surfacing being that the LibreOffice Flatpak does not include the necessary JARs [3].  There might be follow up problems regarding to namespaces, but I did not investigate that far, yet.

[1]: https://www.jabref.org/
[2]: http://help.jabref.org/en/OpenOfficeIntegration
[3]: http://discourse.jabref.org/t/support-flatpaked-libreoffice/744
Comment 1 Stephan Bergmann 2017-08-29 13:22:34 UTC
I don't know which JARs exactly you are talking about.

Due to Flatpak's sandboxed nature, it can be difficult to access an app's special-purpose interfaces (like LO's Java UNO interface) from the outside.
Comment 2 Dennis Schridde 2017-08-29 17:27:47 UTC
(In reply to Stephan Bergmann from comment #1)
> I don't know which JARs exactly you are talking about.

Christoph Siedler (JabRef) says that the following JARs are needed:
* unoil.jar
* jurt.jar
* juh.jar
* ridl.jar

> Due to Flatpak's sandboxed nature, it can be difficult to access an app's
> special-purpose interfaces (like LO's Java UNO interface) from the outside.

Given the list of JARs above: What would be necessary changes to Flatpak, to support this?

As a next step, I would open a feature request for Flatpak (or reference one that already exists, if I find one), asking for those changes to Flatpak.
Comment 3 Xisco Faulí 2018-11-27 14:53:21 UTC
@Stephan Bergmann, Please see comment 2
Comment 4 Stephan Bergmann 2018-11-28 09:43:09 UTC
When external (C++ or Java) programs want to communicate with LO via the UNO Remote Protocol (URP), those programs need access to certain libraries (C++ dynamic libraries or Java jars, resp.) and helper data and code files (e.g., even in the case of Java jars, these reference native code that is implemented in helper native dynamic libraries; see <https://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide> for details on all this).

LO includes all these files, so one way of obtaining access to those files is to ask the LO installation that the external program wants to target about the location of those files.  This is done with the unoinfo helper executable (see desktop/README.md for details).  However, in the case of flatpak, something like `flatpak run --command=/app/libreoffice/program/unoinfo org.libreoffice.LibreOffice java` isn't useful to a program outside the LO flatpak sandbox, as the reported paths don't exist outside that flatpak.  So, to make that work, some way of accessing a flatpak's arbitrary data and code files from outside the flatpak would be necessary, and some mechanism by which the paths that unoinfo reports can be mapped from flatpak-internal to flatpak-external paths.

However, URP and the software artefacts necessary to speak it are evolved compatibly, so it generally works to make an external program use such files that don't come from the targeted LO installation, but rather from a different source.  There has been such a standalone UNO Runtime Environment (URE) in the past, but it has been abandoned for lack of maintenance support (though its traces and concepts are still there in the code, and e.g. some Linux distros still maintain it as a separate LO sub-package).  Such a URE running outside the flatpak (and potentially bundled with the external program) would be an alternative approach to solve this issue.
Comment 5 Xisco Faulí 2019-08-13 10:00:30 UTC
Moving to NEW based on comment 4
Comment 6 QA Administrators 2021-08-13 03:54:43 UTC
Dear Dennis Schridde,

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