Firefox opens previous windows and tabs, option disabled
Despite the fact that I unchecked "Open previous windows and tabs", Firefox always opens them.
All Replies (20)
Make sure you close Firefox before you shutdown the computer and that you do not let the OS close Firefox as this sets some prefs. See restartedByOS:
Athraithe ag cor-el ar
Thank for your reply! I left you a message here, but something happened and today I saw my reply wasn't registered. What do I need to look for there? Do you suggest this may be some sort of OS related issue? It doesn't happen in Chrome though.
Can you confirm whether you close Firefox yourself or that you let the OS close Firefox ?
DF said
Do you suggest this may be some sort of OS related issue? It doesn't happen in Chrome though.
On Linux, Firefox listens for a signal from the system that the system needs it to close because the user is shutting down the system. In that situation, Firefox stores a flag to restore your session. That is the reason for cor-el's question about whether you quit Firefox yourself, or whether you let Linux close it.
cor-el said
Can you confirm whether you close Firefox yourself or that you let the OS close Firefox ?
Sometimes I just shut down the PC while FF is running.
Here is what my OS has for Desktop Session. see screenshot
DF said
Sometimes I just shut down the PC while FF is running.
Your tab session is restored automatically if Firefox was running during shutdown on Windows unless you set toolkit.winRegisterApplicationRestart to false in about:config.
It is also restored if the browser crashes (which could happen during shutdown) unless browser.sessionstore.resume_from_crash is false.
jonzn4SUSE said
Here is what my OS has for Desktop Session. see screenshot
I am on Mint 21.1 and I can't find such an option in the menu.
zeroknight said
DF said
Sometimes I just shut down the PC while FF is running.Your tab session is restored automatically if Firefox was running during shutdown on Windows unless you set toolkit.winRegisterApplicationRestart to false in about:config.
It is also restored if the browser crashes (which could happen during shutdown) unless browser.sessionstore.resume_from_crash is false.
My options for toolkit.winRegisterApplicationRestart are different: Boolean, Number, String Also, I was wondering what that Win in the name of this component means, because I am on Linux. I edited "browser.sessionstore.resume_from_crash" and set the value to "false".
toolkit.winRegisterApplicationRestart is Windows-only.
On Linux you might also need to create a user.js file in your profile folder containing the following:
user_pref("browser.sessionstore.resume_session_once", false);
This pref is normally used to restore the session after applying an update but can get set when rebooting.
So, I have to create a file in my name folder with a single line, the one before and save it as user.js? I am leaving for a few days. I will get back to you as soon as I return.
The OP is on Linux, so toolkit.winRegisterApplicationRestart doesn't apply. That would be about browser.sessionstore.resuming_after_os_restart and browser.sessionstore.resume_session_once. The latter is also used to restore the last session in case Firefox needs to be restarted like when updated or if you restart via the about:profiles page.
Both those values are set on false. I'll be back in 5 days.
DF said
Both those values are set on false.
They are transitory prefs, they only get set to true when the session needs to be restored and are then reset back to false. Setting them to false in the user.js file prevents them from being enabled on startup.
If you would set browser.sessionstore.resume_session_once to false in user.js then you lose your session if Firefox wants to restart for some reason. Firefox sets this pref to true if it wants to restart and reload the current session automatically.
cor-el said
If you would set browser.sessionstore.resume_session_once to false in user.js then you lose your session if Firefox wants to restart for some reason.
The session isn't lost, it is just treated as a normal startup, the user can still manually restore the previous session.
cor-el said
If you would set browser.sessionstore.resume_session_once to false in user.js then you lose your session if Firefox wants to restart for some reason. Firefox sets this pref to true if it wants to restart and reload the current session automatically.
I se... Where do I find that file?
Firefox doesn't create the user.js file, it an optional files users can create themselves that Firefox will look for at startup. Here's an old article for reference:
I couldn't find that profile folder. I read the thread, clicked some links, but got stuck at this profile folder where I had to create the .js file. Here is what I did: accessed about:support, then under Profile Directory I opened it and it lead me into a location in my computer. I checked "show hidden files" but I just couldn't find ~/.mozilla/firefox/<profile folder>. I was able to only find ~/.mozilla/firefox and no profile folder.
The profile directory should be the directory listed on that row (before the button). Did the button not open that exact directory?