Firefox browser disable safe mode

穿精又带淫゛_ 提交于 2019-12-05 20:06:05

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.

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