Αναζήτηση υποστήριξης

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to *permanently* disable Firefox Safe Mode option?

  • 15 απαντήσεις
  • 169 έχουν αυτό το πρόβλημα
  • 4979 προβολές
  • Τελευταία απάντηση από everettlane

more options

I use LeechBlock to limit my time usage for certain sites, but my self control is pathetic to the point where I automatically, and very quickly end up opening Firefox in safe mode (where LeechBlock is disabled, and all sites work). Thus I am wondering if there is a way to *permanently* disable the safe mode option in firefox. I know that in case something goes goofy with firefox, I will probably have to reinstall, but that isn't too big a deal because I backup my profile regularly.

Of course solving this won't 100% get me working, but it would definately make it a much bigger ordeal to bypass LeechBlock.

Thanks to anyone who can help me (except for hypnotists - I'm not at that point yet!)!

Όλες οι απαντήσεις (15)

more options

so i figured it out. i used 7z to extract from the browser.jar file to files called SafeMode.js & SafeMode.xul. I then used skpet to make the "cancel" option the only one, so safe mode can never run! yay!

more options

THANK YOU for this solution. LeechBlock was working great for me until I found out about -safe-mode: two work days gone.

SafeMode.xul is the one you need to edit; for me a text editor works fine (it's a pretty short XML file). The .jar file is just a zip file; rename it to .zip (and back to .jar afterwards) and most zip programs will work.

You need to replace the edited file into the zip so that it becomes content\browser\SafeMode.xul in the ZIP file (and don't use compression).

more options

Thanks. I have the same problem. But unfortunately, I am a layman so this may not help me much!

Anyone who can make it easier?

Thanks.

more options

Sorry, for reviving, but I found the answer very useful and wanted to simplify it for others.

1. Find your browser.jar file (should be in Program Files/Mozilla Firefox/chrome/browser.jar on Windows and /usr/lib/firefox-INSERT_VERSION/chrome on Ubuntu)

2. Copy browser.jar to another directory (such as the desktop) because you might not be able to edit it there if you don't have the correct permissions.

3. Rename browser.jar to browser.zip. You may have some issues in Windows with it calling it browser.zip.jar. You can fix this by enabling file extensions in Folder Options.

4. Extract browser.zip

5. Navigate to content/browser

6. Delete safeMode.xul and safeMode.js (WARNING! THIS IS NOT REVERSIBLE, you should make a backup). Then make a .zip file (you could use 7zip, IZArc, File Roller, or any other of the numerous free utilities). Call it browser.zip and copy the "content" folder into it.

7. Rename it browser.jar

8. Close Firefox, if open.

9. Copy your new browser.jar back to the directory in step 1. You may need to use "sudo mv" on Ubuntu.

10. Restart Firefox and Safe Mode will no longer be accessible!

Hope this helps!

Τροποποιήθηκε στις από το χρήστη InverseHypercube

more options

Inverse,

I tried this on myself and unfortunately found an easy (too easy) way to circumvent it. If I have the normal browser open, then open safe mode in the "run" box, it will open a version of the browser with no restrictions on it.

I will try manually editing the safemode.xul file and see what I can make it do.

more options

Amendment to the above: So when you delete the safemode files completely as suggested above, with no browsing windows open, if you execute safemode from the run menu, a tiny window with nothing in it will pop up. when you click x on this window, an unprotected browser pops up.

I followed the suggestion of removing the buttons from the safemode.xul file and it seems to work so far!

Τροποποιήθηκε στις από το χρήστη tharptroy

more options

Okay, I did this but it doesn't work. Small box opens up and once i close it, FireFox opens without add-ons

Instructions for removing buttons would be helpful. I can't find that information anywhere. Thanks

Τροποποιήθηκε στις από το χρήστη lonewolfsc

more options

Hey I would really like to disable safemode too.

But when I look in

C:/ Program Files (x86) / Mozilla Firefox / chrome - the folder is EMPTY

I can't find the browser.jar file at all.

Help please!!

more options

Yeah, I am having the same trouble as feliou. My 'chrome' folder only had 'icons' in it, but not the correct files. I searched my hard drive and could not find any .jar files.

Any help would be greatly appreciated.

more options

Hello, I have figured out how to permanently disable Safe Mode in Firefox 5.0.1. Just follow these steps:

1) Go to "C:\Program Files\Mozilla Firefox\". On a Windows 7/Vista 64-bit system, go to "C:\Program Files (x86)\Mozilla Firefox\" instead.

2) Copy "omni.jar" to another location (for example, your desktop)

3) Change the file's extension to .zip ["omni.jar" to "omni.zip"]*

4) Extract the contents of "omni.zip" (in 7-zip, right click on "omni.zip" --> "7-zip" --> "Extract here")

5) Now open the "chrome" folder, then go to "browser" --> "content" --> "browser"

6) Delete "safeMode.js"

7) Open "safeMode.xul" (Windows Notepad will do) and delete this string (I've put it in between square brackets for your convenience) [buttons="accept,cancel,extra1"

           buttonlabelaccept="&changeAndRestartButton.label;"
           buttonlabelcancel="&quitApplicationCmdWin.label;"
           buttonlabelextra1="&continueButton.label;"
           width="&window.width;"
           ondialogaccept="return onOK()"
  ondialogcancel="onCancel()"
           ondialogextra1="window.close()"
           onload="onLoad();"
     buttondisabledaccept="true">]. Save the file.

8) Open "browser.xul" (Windows Notepad will do) and delete this string (I've put it in between square brackets for your convenience) [<menuitem id="appmenu_safeMode"

                     label="&appMenuSafeMode.label;"
                     oncommand="safeModeRestart();"/>
           <menuseparator/>]. Save the file.

9) Now compress all the files and folders that were extracted in step 4, and name the zip archive "omni.zip"

10) Change the file's extension to .jar ["omni.zip" to "omni.jar"]

11) Move "omni.jar" to the folder specified in step 1. If the system asks you to overwrite anything, do it.

Now you won't be able to start Firefox in Safemode by going to "Help"-->"Restart Firefox with add-ons disabled" in the browser's menu bar. You can still circumvent this hack and run Firefox in Safemode anyway, but it will be more time consuming and will, hopefully, deter you from doing so.

  • make sure Windows Explorer is set to show file extensions.
more options

You only need to have the Shift key pressed on Windows to start Firefox in Save mode, so that won't help much.
You can also easily hide such menu entries with code in userChrome.css , so no need to hack files.

#helpSafeMode, #appmenu_safeMode { display: none !important; }
more options

If I press the Shift key when starting firefox, it runs in normal mode. Anyway, I had a slight feeling my hack was a little too "hardwired", thanks for the CSS code!

more options

Hi All

I found none of the above working in Firefox 7.0. I will provide a slightly modified version. Please execute the following steps. The deoptimization of omni.jar seems to be necessary in order to modify the file:

1. Go to C:\Program Files (x86)\Mozilla Firefox

2. Copy omni.jar to a new folder

3. Install CPython: http://www.python.org/

4. Get optimizejars.py from: http://hg.mozilla.org/mozilla-central/raw-file/f7016571b472/config/optimizejars.py

5. Safe it to the same location as your omni.jar copy

6. In a command promt at your omni.jar location run: optimizejars.py --deoptimize .\ .\ .\

7. Open omni.jar with winrar (Do not extract it, just open it in winrar)

8. In winrar browse to \chrome\browser\content\browser

9. Extract safeMode.xul (e.g. drag and drop it onto your Desktop)

10. Open safeMode.xul with a texteditor

11. Change safeMode.xul so that all button calls result in an onCancel() call and that onCancel() is also called when the dialog loads. These changes make it impossible to access the dialogue. Change the file according to the following lines in square brackets.:

[ondialogaccept="onCancel()"

ondialogcancel="onCancel()"

ondialogextra1="onCancel()"

onload="onCancel();"]

12. Safe safeMode.xul and drag and drop it onto the winrar window into the path described under 8.

13. Close winrar, close Firefox

14. Backup and replace the original omni.jar in the Firefox directoy with your modified omni.jar

Τροποποιήθηκε στις από το χρήστη sleep_less

more options

I did everything up until Step 12 -- but whenever I tried to copy safeMode.xul back into the omni.jar file open in WinRAR I got an error and could not proceed.

Any help you could offer would be very appreciated.

Thanks!

more options

AL9045, I had the same problem (using FF 8.0) -- I tried all the different "modes" in WinRar (add and replace, add and update, etc.) and when I do all the files *except* for safeMode.xul disappear, although the jar file size is about the same. Copying the new omni.jar file over the old one doesn't work, FF won't start. (By the way, if you're in Windows 7, you'll need to use the Command Prompt in admin mode to copy any files into the Program Files (x86) directory.) I tried using jdk to extract and then recreate the jar file, but that pretty quickly went beyond my abilities. Anyway if anyone has a solution, please post! Thanks in advance.