Do we have a bug for this? I can reproduce back to 2.1.0. 1. From the terminal, run lyx testfile.lyx (where testfile.lyx does not yet exist).
2. type something 3. exit 4. in the dialog "save changed document?" answer "yes" I get the message "LyX attempted to close a document that had unsaved changes! LyX: Attempting to save document /tmp/testfile.lyx Saved to /tmp/testfile.lyx.emergency. Phew. Note that my working directory was /tmp. Scott