disable file locking

Version: 6.2.5.2
Build ID: 1:6.2.5-0ubuntu0.19.04.1

How to do this.

I have modified /usr/bin/soffice by setting locking to 0 as so (it was set to 1):

# file locking now enabled by default
SAL_ENABLE_FILE_LOCKING=0
export SAL_ENABLE_FILE_LOCKING

However libreofice writer is still creating lock files.

I don’t see anything on the man page either.

Anything else to try?

SAL_ENABLE_FILE_LOCKING environment variable is not tested for its value: actually, it’s only tested for its existence. So to actually disable it, you need to unset (or unsetenv) it … which would simply disable using fcntl with F_SETLK command (or flock where the former isn’t available). It’s about file-system locks, e.g. on NFS, and is orthogonal to creation of lock files.

So - answering your question:

Anything else to try?

Just put “disable file locking” (the caption of your question) into the search box on this page, and press enter to search for this - and it will give you many results, among which are such as How Can We Turn Off File Locking in the Mac Version? and How do I prevent these lock files from being created/deleted?.