How to "Disable Editing" of a document in LyX by default?

by kdb   Last Updated September 11, 2019 14:23 PM - source

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?

Tags : lyx editors

Answers 1

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]

September 11, 2019 14:14 PM

Related Questions

how to put ">" before lines?

Updated June 06, 2015 21:10 PM

need to find a good editor for mac

Updated July 27, 2015 18:10 PM

Vim latex suite "alt" macro not working

Updated June 07, 2015 22:10 PM

Is there a LaTeX wrapper for use in Google Docs?

Updated August 23, 2015 17:10 PM

Is there a text editor that previews LaTeX?

Updated March 05, 2016 01:10 AM