opening/saving files with OpenOffice in Ubuntu on NFS share PDF Print E-mail
User Rating: / 1
PoorBest 
Written by Bart Dorlandt   
Tuesday, 17 November 2009 14:12

Using OpenOffice (2.2 or higher) with files located on a NFS share causes problems. Simply said, you are not able to open the file for writing and/or you are not able to save the file. (depending on the format you use)

A solution for this will be the following:

edit /usr/lib/openoffice/program/soffice, go to line 102

if [ -z "$SAL_ENABLE_FILE_LOCKING" ]; then
case "$FILE_LOCKING" in
auto)
file_or_home_on_nfs "$@"
if [ $? -eq 0 ]; then
# file locking now enabled by default
SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING
fi

Comment out the line "export SAL_ENABLE_FILE_LOCKING". So it looks like:

if [ -z "$SAL_ENABLE_FILE_LOCKING" ]; then
case "$FILE_LOCKING" in
auto)
file_or_home_on_nfs "$@"
if [ $? -eq 0 ]; then
# file locking now enabled by default
SAL_ENABLE_FILE_LOCKING=1
#export SAL_ENABLE_FILE_LOCKING
fi

You are done. Save the file and test it.

Remember to do this after an upgrade of OpenOffice. But you'll notice it anyway Wink

 


Related items: