Problems with OpenOffice and NFS mounts
This article shows a solution to OpenOffice NFS locking problems
The Problem
Linux versions of OpenOffice 2.0 and 2.2 (and possibly others) just fail to save files mounted over NFS.
Examples:
- OpenOffice opens files over NFS in read-only mode, and doesn't let the user save the changes to the file.
- If the user's profile (
~/.openoffice.org2) is on NFS, the user has to run the install wizard each time he starts OpenOffice. - If the user's profile (
~/.openoffice.org2) is on NFS, the user cannot make changes to the configuration (such as autocorrect): after the dialog box is closed, changes are lost. - OpenOffice sometimes hangs when saving files or exiting.
The Reason
Openoffice fails to lock files over NFS. It just fails without an error
message or just hangs when saving files over NFS. (The proper behaviour
would be making locking work over NFS (yes, it is possible, see
O_EXCL in man 2 open in Linux), or displaying a
warning, which could be disabled by the user.)
The Workaround
Edit the file `type -p soffice` as root. Comment out all
lines containing the word LOCKING (case sensitive), and add the
following replacement there:
STAR_PROFILE_LOCKING_DISABLED=1
export STAR_PROFILE_LOCKING_DISABLED
#SAL_ENABLE_FILE_LOCKING=1
#export SAL_ENABLE_FILE_LOCKING
unset SAL_ENABLE_FILE_LOCKING