LibreOffice can't open files through gvfs

This is a known issue for long: LibreOffice can't open files from a gvfs with Nautilus, File or similar Ubuntu file browser, by doubleclick, regardless the file is on a smbfs or on a davfs.

This behavior was noted on Ubuntu desktop systems starting with 13.04.

The error is the following: General Input/Output error while accessing /run/user/1000/gvfs/[smb|dav]...

Workaround on the net suggests executing
sed -i 's/X-GIO-NoFuse=true/#X-GIO-NoFuse=true/' /usr/share/applications/libreoffice-* in order to comment out X-GIO-NoFuse=true line in all/usr/share/applications/libreoffice-* configuration files.

For me this workaround simply didn't work because I don't have this line in those configuration files.

Yet the solution was to add this line X-GIO-NoFuse=true to all /usr/share/applications/libreoffice-* configuration files.

Result: on doubleclick on the file from the file browser, user is prompted for a username and a password, regardless the file system the file is accessed, is already mounted. After the username and the password for the filesystem are provided, file opens without any problem.

For me this was a good workaround.