Firefox browser disable safe mode

一笑奈何 提交于 2019-12-10 10:14:14

问题


I am using Windows 7 and I've been playing with the Firefox browser for a while. I want to create a kiosk app using it, I installed a plugin for that, but the problem is that when I start the Firefox app, if I press Shift, it enters safe mode.

I read some guides on Google that tell me to edit chrome/browser.jar but I have no such file in my Firefox folder.

I need some help for disabling the feature that lets me enter safe mode by pressing Shift.


回答1:


You cannot really disable safe mode by editing text files, the handling of the Shift key is inside compiled code. You can however disable the dialog that pops up by removing this code from components/nsBrowserGlue.js:

// check if we're in safe mode
if (Services.appinfo.inSafeMode) {
  Services.ww.openWindow(null, "chrome://browser/content/safeMode.xul", 
                         "_blank", "chrome,centerscreen,modal,resizable=no", null);
}

You can also leave extensions enabled in safe mode. For that you will have to also edit modules/XPIProvider.jsm and remove all occurrences of code like:

if (Services.appinfo.inSafeMode)
  return false;

Both files can be found inside the onmi.ja archive in the Firefox directory.

That said, the proper solution to this problem would be running your own application on top of XULRunner which would allow you to design your own user interface for kiosk mode. Sadly, Open Kiosk (which is probably what you are using) is ancient and predates XULRunner.




回答2:


I managed to disable Firefox session restore and safe mode tweaking these two preferences:

browser.sessionstore.resume_from_crash  => false
toolkit.startup.max_resumed_crashes     => -1


来源:https://stackoverflow.com/questions/10707687/firefox-browser-disable-safe-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!