tux-linux
You’re using Linux at work, while all the others are on Windows? You’re cool! Linux can handle just about anything, and has solutions for just about anything. However, sometimes you may just run into some issues. Using LibreOffice of OpenOffice to open documents which reside on a Windows network is one of those problems.

What does it do?
LibreOffice and OpenOffice simply crash when you try to open a document in a samba folder. If you open Libre/OpenOffice, and go via the “Open file” dialogue to open the file, Libre/OpenOffice will tell you it cannot open files on a network drive.

The reason?
LibreOffice and OpenOffice don’t use the byte-range blocks as MS Office does, and which is mandatory for the CIFS (Windows shared) folders.

openoffice
The solution?
Add an entry to your filesystem table (/etc/fstab) to mount the folders as CIFS, but tell your system to ignore the byte-range blocks.

How?
First, we need a mountpoint, a directory where we can mount this network folder.
Open a terminal, and create a directory with the name of your choice under the /mnt directory: “sudo mkdir /mnt/

Then, make sure you have the samba filesystem package installed. If not, or if unsure do this: “sudo apt-get install smbfs”
Now, we need to tell “mount” what and where to mount, so open /etc/fstab and edit! In a console, type “sudo gedit /etc/fstab” or if you’re using KDE type “sudo kate /etc/fstab” or just use any teksteditor you like! 😉
In your fstab, add the following line: “//<nameof_the_share_or_IP_address>/ /mnt/<foldernameyoucreatedbefore> cifs auto,iocharset=utf8,nobr1,username=<windowsusernameyouneedtoconnect>,password=<windowsnetworkpasswordyouneedtoconnect>,_netdev,uid=<yourlinuxusername>,gid=<yourlinuxgroup_id> 0 0”




Save the file, close the editor, and in your terminal type “sudo mount -a” to see if the network drive has been mounted. If unsure, type “cd /mnt/” and do a “ls” to see what it brings you.
Normally, if the name of the share is registered on the network, you can use that in your fstab (to test it, type “ping name_of_the_share”), if not, you’ll have to use the ipaddress.
If your network share is secured, you’ll need the login credentials to mount the drive. If it is unsecured, you can omit these credentials in your fstab, and just use “guest” instead.
Make sure you have the “nobr1” option in your fstab line!!! As this is the option that tells your apps to ignore the byte range blocks!
So, if all goes well, I wish you some happy Libre/OpenOffficing on your network shared windows folders!!!

Share via
Copy link