Connecting with LibreOffice Snap under Ubuntu 16.04

I’m trying to connect JabRef to a LibreOffice (LO) Writer file. I was able to before but can’t now–I think because I’m now using the LO snap under Ubuntu.

Trying to connect automatically fails.

Trying to manually with these settings (while a LO Writer file is indeed running and after installing libreoffice-java-common):

  • Path to OpenOffice executable: /snap/libreoffice/44/lib/libreoffice/program/soffice
  • Path to OpenOFfice library dir: /snap/libreoffice/44/lib/libreoffice/program/classes

Also fails, generating this error message:

Could not connect to running OpenOffice.
Make sure you have installed OpenOffice with Java support.
If connecting manually, please verify program and library paths.

Error message: File not found: /snap/libreoffice/44/lib/libreoffice/program/classes/program/classes/unoil.jar

Given that it somehow replicates “program/classes/” in its search, I tried using, e.g., “/snap/libreoffice/44/lib/libreoffice” (and similar options) as the path to .jar files instead to no avail.

Does anyone have any idea how to establish an OpenOffice/LibreOffice connection under these circumstances?

Thank you in advance.

More info:

  • Using this build of LO:
    • Version:
    • Build ID: libreoffice-
    • CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: gtk3;
    • Locale: en-US (en_US.UTF-8); Calc: group
  • Using JabRef v 2.10
  • Using Ubuntu 16.04

Your JabRef is very much outdated. Version 2.10 was released a few years ago and in the meantime we are already at 4.1. You can download the new version on fosshub and then probably need to install openjfx to run it.

Hopefully the upgrade to the newer JabRef version already fixes your problem.

Thank you very much for your help, Tobias.

I installed and ran both JabRef v 4.1 by following your instructions, i.e., first downloading the latest version of Java from then running:

sudo apt-get install openjfx
java -jar JabRef-4.1.jar

I also installed the JabRef snap (v 4.0-dev) with:

sudo snap install jabref --edge --devmode

Running either instance of JabRef made the error returned by JabRef change to be the slightly-more-optimistic:

Could not connect to running OpenOffice/LibreOffice.
Make sure you have installed OpenOffice/Libreoffice with Java support.
If connecting manually, please verify program and library paths.

Error message: (Not all) required Open Office Jars were found inside the installation path.

(The paths are the same as I noted before; changing the library dir path to /snap/libreoffice/44/usr/lib/jvm/java-8-openjdk-amd64/jre didn’t change the error.)

Making me suspect that updating JabRef indeed helped, but that my particular issue is with Java (or possibly the paths to LO and the libraries).

LibreOffice indicates it’s using JRE v 1.8.0_151:

A bit of searching suggests this JRE should suffice, so I suspect I have some sort of “deeper” problem with Java.

I’ll keep fiddling and post here if I figure it out.

Thank you again for your help!

@Siedlerchr can you please have a look. If I remember correctly, you recently fixed a few things in the OO/LO connector.


thanks for your report! I could reproduce your error and my guess is that it’s due to the snap installation of libreoffice. Maybe @koppor can add more details on the snap access controls here.

The best is to install libreofifce the classic way. They also provide a PPA:

Best Regards

Thank you both so much for your continued help.

I un-installed the snap build of LO and instead installed the latest “LibreOffice fresh” build (v by adding

sudo add-apt-repository ppa:libreoffice/libreoffice-5-4

and then installing LO via the Ubuntu Software app.

I think the issue (for me?) may be finding the LO executable (the soffice file) and library dir. After removing the snap version of LO and installing the “fresh” version from the software center, a soffice file is located in two places under /usr:

Other instances of soffice are in, e.g., old snap folders. Could it be that I’ve messed things up with multiple versions of LO coming and going?

Is there a way to know / find where to point to the correct LO executable and library dir sources?



you might need to install the java extension libraries first:

sudo apt-get install libreoffice-java-common

the default folders for LO configuration are both under /usr/lib:

And you first have to start LIbreOffice Writer to sucessfully connect.

Thank you, Christoph.

Running that command to install those libraries and points JabRef to those dependencies fixes the error I was getting.

(I have some weird settings somewhere; whenever I restart my computer, I have to re-run the command to re-install the java extension libraries.)

I really do appreciate the great assistance you all have given me.

1 Like

In my case, JabRef can connect to the Snap version of LibreOffice Writer, but only if the writer is executed via command line:

/snap/libreoffice/65/lib/libreoffice/program/soffice --writer --nologo &

libreoffice-java-common is still required, even though the required jar files ("unoil.jar", “jurt.jar”, “juh.jar”, and “ridl.jar”) were in /snap/libreoffice/65/lib/libreoffice/program/classes. So, setting the manual connection to this folder is useless. I had to do:

sudo apt install libreoffice-java-common

Thanks for the answer! Would you mind adding this to the Known Issues help section?

(Just click “Edit this page” at the bottom

I think I added this to that Known Issues page. Thanks again everyone!