I want to disable file locking in LibreOffice, i.e., the creation of a hidden lock file in the directory of an opened document. The advice of the official documentation to comment out the second of the lines


in /usr/bin/soffice (which is really a symbolic link targeting /usr/lib/libreoffice/program/soffice) does not help. The lock files are still created.

I use Ubuntu 12.04 which has LibreOffice

3 Answers 3


To disable locking open Terminal application, then copy, paste and execute following command.

Notice: it's one long command, 12 lines, starts with "echo" and ends with "disable-file-locking.xcd".

echo '<?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">
</oor:data>' |
sudo tee /usr/lib/libreoffice/share/registry/disable-file-locking.xcd

To undo changes:

sudo rm /usr/lib/libreoffice/share/registry/disable-file-locking.xcd
  • I know this is Ask Ubunutu, biut for googlers wondering about the same problem on macOS: the same recipe works using /Applications/LibreOffice.app/Contents/Resources/registry/disable-file-locking.xcd. Commented Apr 26, 2017 at 19:57

Modify ~/.config/libreoffice/4/user/registrymodifications.xcu.


<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="UseLocking" oor:op="fuse"><value>false</value></prop></item>

after the other <item oor:path="/org.openoffice.Office.Common/Misc">

  • Make the change while all LO documents are closed. LO will rewrite its settings when we close a document. Commented Oct 4, 2019 at 12:11

You can now change settings (even in Windows) from UI. Source

Since version 4.2, we have Expert Configuration feature allowing one to set different power-user settings from [...]
Options->LibreOffice->Advanced->Open Expert Configuration. [...]
org.openoffice.Office.Common/Misc/UseLocking setting
(controlling creation of lockfiles and using locking in general), and org.openoffice.Office.Common/Misc/UseDocumentOOoLockFile setting
(controlling whether the present lockfile will be considered when deciding if the file is locked by someone else).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .