Short tip: Remove gnome-text-editor session

gnome-text-editor, the default editor of the GNOME desktop, usually remembers recently opened documents and reopens them on startup after a crash. This is particularly impractical if the crash is caused by opening a file that is too large (e.g. 20 MB JSON dump) or unsupported (e.g. binary file):

Crashed gnome-text-editor

Unfortunately, the parameters -i or --ignore-session do not help to solve the problem. One option is to remove the erroneous session so that the editor can be started again without errors:

1$ rm ~/.local/share/org.gnome.TextEditor/session.gvariant

Alternatively, the session saving function can generally be switched off:

1$ gsettings set org.gnome.TextEditor restore-session false