# Integrations in snap/flatpak

**URL:** <https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468>\
**Category:** Help\
**Created:** [December 24, 2020, 5:25pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468 "2020-12-24T17:25:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LyzardKing](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/lyzardking/32/732_2.png) [@LyzardKing](https://discourse.jabref.org/u/LyzardKing)\
**Post date:** [December 24, 2020, 5:25pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/1 "2020-12-24T17:25:31Z")

</div>

Can somebody explain the process used to integrate with libreoffice? I’m working to enable the integrations in the snap/flatpak packages, so far the ones that are called as a binary (i.e. texshow, texmaker) work by escaping the confinement in the flatpak.

A temporary list of the working connections is:  
Flatpak

- [X] Texworks
- [X] Texmaker
- [X] Lyx

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [December 25, 2020, 9:38pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/2 "2020-12-25T21:38:43Z")

</div>

Hi,

LO needs to be started with a writer document first  
JabRef;  
1.Search for: soffice(.exe) binary and additionally,  
for the jars to be present: “unoil.jar”, “jurt.jar”, “juh.jar”, “ridl.jar”  
2. Create a UrlClassLoader for the jars (The classLoader is needed so that the LO Boostrap method finds the executable soffice)

> <https://github.com/JabRef/jabref/blob/c8f7be89ad704065474decb61851e42416caf88d/src/main/java/org/jabref/gui/openoffice/Bootstrap.java#L286>

3. soffice(.exe) is called via command line arguments (similar as here) to create a socket [https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Getting\_a\_Service\_Manager](https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Getting_a_Service_Manager)  
4. A connection to the local socket is established

Originally, LO used pipes in the Bootstrap, but the only way I got it working was to use the sockets and pass that UrlClassLoader down.  
I think the original problem is that the LO class is searched for in the wrong location: [https://github.com/LibreOffice/core/blob/86707f3595c282f80b5e09558a23b539446daca2/ridljar/com/sun/star/comp/helper/Bootstrap.java#L335-L347](https://github.com/LibreOffice/core/blob/86707f3595c282f80b5e09558a23b539446daca2/ridljar/com/sun/star/comp/helper/Bootstrap.java#L335-L347)  
If I remember correctly, the problem was that this default LO implementation never searches the LO program directory.

---

<div class="post-metadata">

**Author:** ![LyzardKing](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/lyzardking/32/732_2.png) [@LyzardKing](https://discourse.jabref.org/u/LyzardKing)\
**Post date:** [December 26, 2020, 2:29pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/3 "2020-12-26T14:29:33Z")

</div>

[] VIm - Does not find the server  
[] Emacs - Does not find the server

Vim might be missing the server part in the ubuntu repos…

---

<div class="post-metadata">

**Author:** ![LyzardKing](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/lyzardking/32/732_2.png) [@LyzardKing](https://discourse.jabref.org/u/LyzardKing)\
**Post date:** [December 26, 2020, 2:31pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/4 "2020-12-26T14:31:18Z")

</div>

In the flatpak I can give access to the libreoffice folder, and in the tree I have the jar files.  
Unfortunately it still complains about the files being missing…

The folder has to be treated differently, but it is essentially mounted inside the flatpak, so in theory it should work…

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [December 26, 2020, 5:12pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/5 "2020-12-26T17:12:31Z")

</div>

I can try to prepare a more debug version with some extra logging so we can see where exactly it fails

---

<div class="post-metadata">

**Author:** ![LyzardKing](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/lyzardking/32/732_2.png) [@LyzardKing](https://discourse.jabref.org/u/LyzardKing)\
**Post date:** [December 26, 2020, 5:40pm UTC](https://discourse.jabref.org/t/integrations-in-snap-flatpak/2468/6 "2020-12-26T17:40:06Z")

</div>

By texworks I obviously meant texstudio…
