Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

closing Firefox on linux from the terminal and avoiding "restore session" warnings

  • 1 回覆
  • 0 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

I'm trying to just close and restart firefox from some bash scripts on Linux so that I can manage a few items from various hotkeys.

I'm trying to close an existing Firefox process "cleanly", and am running into issues with how to kill the Firefox process and have it restart without showing the "restore session" page. If I update about:config and override "browser.sessionstore.resume_from_crash" to false, then I get the behavior I'm looking for, but I'd rather not have to override this.

I've tried multiple kill signals from the `kill` command, including HUP, STOP, QUIT, TERM, INT, however all of them seem to trigger the same behavior.

So is there a way to cleanly close (or restart) Firefox from the terminal?

I'm trying to just close and restart firefox from some bash scripts on Linux so that I can manage a few items from various hotkeys. I'm trying to close an existing Firefox process "cleanly", and am running into issues with how to kill the Firefox process and have it restart without showing the "restore session" page. If I update about:config and override "browser.sessionstore.resume_from_crash" to false, then I get the behavior I'm looking for, but I'd rather not have to override this. I've tried multiple kill signals from the `kill` command, including HUP, STOP, QUIT, TERM, INT, however all of them seem to trigger the same behavior. So is there a way to cleanly close (or restart) Firefox from the terminal?

所有回覆 (1)

more options

You probably need to remove sessionCheckpoints.json in the Firefox profile folder to make Firefox think it's a new profile.