User Tools

Site Tools


doc:appunti:linux:tux:libreoffice

LibreOffice

Problem Locking Files on Remote (smbnetfs) Filesystem

Trying to open an XLSX file from a directory mounted via smbnetfs, LibreOffice 6.0.7 will complain about not being able to create the lockfile. It is not a problem about space or permission, because actually (we used strace to debug) the lockfile is created, but some other error occurred.

A brutal workaround is to disable lockfile creation system-wide. Just create a file called /usr/lib/libreoffice/share/registry/disable-file-locking.xcd with this:

<?xml version="1.0" encoding="UTF-8"?>
<oor:data xmlns:oor="http://openoffice.org/2001/registry">
  <dependency file="main"/>
  <oor:component-data oor:package="org.openoffice.Office" oor:name="Common">
    <node oor:name="Misc">
      <prop oor:name="UseLocking">
        <value>false</value>
      </prop>
    </node>
  </oor:component-data>
</oor:data>

Another workaround is to let LibreOffice to talk the smb protocol directly, without the smbnetfs mount. Just execute the command line:

libreoffice smb://192.168.1.10/tmp/file.xlsx

It seems that opening remote files directly requires a recent version of LibreOffice. It seems that version 5.4 should suffice. See the following web resources:

doc/appunti/linux/tux/libreoffice.txt · Last modified: 2019/03/06 12:55 by niccolo