LibreOffice Calc - read-only files

Hi. We have a number of raspberry pi devices that access files on our network storage device. The pi’s have only read access to the various files: jpg, pdf, doc, xls, etc.

When the clients open an xls file with LibreOffice Calc, they get a warning message about that “the document in use is locked” and are asked how they want to open the file. Of course, they select read-only.

Is there an option to have Calc always open xls files in read-only mode without asking the question about a locked document? I am trying to save our clients a step in opening the xls files. Thanks, in advance.

Have you tried localc --nolockcheck file.xls?

Have you tried localc --view file.xls?

If you mean that they double click on files then you need to change the MIME association to use one of those options above.

On a Debian Stretch system you may try to edit:

/usr/share/applications/libreoffice-calc.desktop
/usr/lib/libreoffice/share/xdg/calc.desktop
/usr/lib/mime/packages/libreoffice-calc

After editing those files, you may need to run some of these commands:

update-desktop-database
update-mime
update-mime-database

Or you may try to do it graphically in your desktop environment.

Thank you. The options you provided worked perfectly! Thanks, again!

Great! Please mark the answer as correct then, thanks!

Thank you. The options you provided worked perfectly! Thanks, again!

Please use add a comment for comments and thank you messages instead of adding them as answer to the the original question, which it is not. Thank you.