Related to How to "Disable Editing" of a document in LyX?: Is it possible to open documents as read-only by default in LyX?
While scrolling through a mostly finished document, or when copying contents from another document, it is easy to accidentially change the contents. For instance I may want to to a forward search and therefore type
M-x forward-search, but accidentially start typing
xforward-search instead. Under time constraints it is easy to accidentially miss the extra characters added.
LyX allows a "disable editing" state as described in the linked question, and meanwhile also has it in the menubar.
But I would prefer for "Disable editing" / read-only mode to be the default state of LyX documents.
Is this possible?
You can open a LyX file read-only with the following command:
lyx -x "buffer-toggle-read-only" file.lyx
I just tested on Ubuntu with LyX 2.3.3 and it worked well for me.
If you prefer to not use the command-line, it should be easy to set this as the default, or as an alternative. On Ubuntu, I would just edit the
lyx.desktop file. Or you can create a separate entry, e.g., "LyX-readonly", so that in your desktop environment whenever you open a LyX file you can choose between "LyX" and "LyX-readonly". Let me know if you are using Ubuntu (or more generally Gnome) and I can give more instructions.
For Microsoft Windows and macOS, there must be a way as well but I am not familiar with it. [if anyone knows, please feel free to edit this answer]