搜尋 Mozilla 技術支援網站

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

了解更多

Start Firefox in Safe Mode without prompt?

  • 6 回覆
  • 3 有這個問題
  • 11 次檢視
  • 最近回覆由 darxide23

more options

I'm going to be running a script which closes and reopens Firefox at regular intervals. This script will launch Firefox in Safe Mode, however using the -safe-mode command line option still displays the prompt to start in Safe Mode or to Refresh. I can't have this prompt appear as the script can't handle it. Is there another command line option or setting in about:config I can use to disable this prompt and to make Safe Mode the default at all times as opposed to Refresh?

I'm going to be running a script which closes and reopens Firefox at regular intervals. This script will launch Firefox in Safe Mode, however using the -safe-mode command line option still displays the prompt to start in Safe Mode or to Refresh. I can't have this prompt appear as the script can't handle it. Is there another command line option or setting in about:config I can use to disable this prompt and to make Safe Mode the default at all times as opposed to Refresh?

所有回覆 (6)

more options

Why do you want to run Firefox in Safe Mode?

There is no way to prevent the confirmation dialog from showing AFAIK. Safe mode disables the extensions and disables some other features.

In Firefox Safe mode these changes are effective:

  • all extensions are disabled (about:addons)
  • default theme is used (no persona)
  • default toolbar layout is used
  • xulstore.json is ignored
  • userChrome.css and userContent.css are ignored (chrome folder in profile folder)
  • JavaScript JIT compilers are disabled
  • hardware acceleration is disabled (Options > Advanced > General)
  • plugins are not affected
  • preferences are not affected
more options

cor-el said

Why do you want to run Firefox in Safe Mode?

I need to disable all addons (plugins are fine). If there's a command line option to start without addons, that would be sufficient.

由 darxide23 於 修改

more options
more options

FredMcD said

Create a second profile with no add-ons.

Less than ideal, but it works fine. Another question then.

My script (a .bat batch file in Windows) looks like this:

taskkill /f /im firefox.exe timeout /t 5 "d:\program files\Mozilla Firefox\Firefox" -p TestProf -url http://www.myurl.com timeout /t 15 "d:\program files\Mozilla Firefox\Firefox" -p TestProf -new-tab http://www.myurl.com/mypage

The script will not continue past opening the first URL until I close Firefox. With Chromium based browsers (testing with Opera specifically) the above script will execute just fine and open both URLs. Is there any way to do this with Firefox?

由 darxide23 於 修改

more options

darxide23 said

With Chromium-based browsers (testing with Opera specifically) the above script will execute just fine

The same command on two different systems may not be the same.

I think with Windows batch programs, the program only executes one command, waits until that command is finished, then goes on to the next command.

more options

FredMcD said

darxide23 said
With Chromium-based browsers (testing with Opera specifically) the above script will execute just fine

The same command on two different systems may not be the same.

I think with Windows batch programs, the program only executes one command, waits until that command is finished, then goes on to the next command.

Well it's the same system and your understanding of batch scripts is flawed. The batch will wait until a command finishes, that's true, but Chromium apparently sends back a return code to the command line once it starts up so the script continues on with the next command. Firefox isn't sending back a return code until it exits. That's no bueno for my needs.

由 darxide23 於 修改