How to disable Firefox's session restore crash recovery feature

You may find Firefox's session restore crash recovery feature annoying and not too useful. You can disable this feature fairly easily.

The Firefox crash recovery warning
"You last Firefox session closed unexpectedly. You can restore the tabs and windows from your previous session, or start a new session if you think the problem was related to the pare you were viewing. Start New Session, Restore Session"

Disabling crash recovery feature

 * Open about:config in the Firefox location bar
 * Type browser.sessionstore.resume_from_crash in the filter box, or search for it manually iny
 * Double click
 * browser.sessionstore.resume_from_crash
 * It should change from
 * browser.sessionstore.resume_from_crash default boolean true
 * to
 * browser.sessionstore.resume_from_crash user_set boolean false
 * Close and restart Firefox, and it should not warn you any more (but it does)

Script to manually disable in Debian or Ubuntu

 * 1) create a new shell script file with a text editor of your choice (such as gedit)
 * 2) and add the following code to it:
 * 3) open gedit
 * 4) paste " " into the new blank gedit window.
 * 5) Replace USER with your User Name
 * 6) or, substitute " " with " "
 * 7) WARNING: there's at least two things wrong in that code, I'm too tired to fix it, so maybe don't use this until someone fixes it. If it does work, it will permanently delete your last session.
 * 8) Click the File menu and Save As
 * 9) Name the file DestroyFirefoxSession.sh
 * 10) Save in folder: Drop down menu select: Desktop
 * 11) Save the file, then it on your Desktop.
 * 12) then, assign permissions to the new   file so that it can be executed (run)
 * 13) Right click on DestroyFirefoxSession.sh and click Properties
 * 14) Click the Permissions Tab.
 * 15) Check the box next to Execute: Allow executing this file as program. Close
 * 16) run the script
 * 17) Find DestroyFirefoxSession.sh on your Desktop and double click.

To have Firefox restore previous window after any closing of Firefox (crash or no crash)
link title
 * 1)  Open the Firefox options panel.
 * 2) * (Windows) At the top of the Firefox window, click on the Tools menu, and select Options...
 * 3) * (Mac) On the menu bar, click on the Firefox menu, and select Preferences...
 * 4) * (Linux) At the top of the Firefox window, click on the Edit menu, and select Preferences...
 * 5) Click the Main icon
 * 6) From the When Firefox starts drop-down, select Show my windows and tabs from last time
 * 7) Click OK