FAQ: How can I disable safe (troubleshoot) mode on Firefox?

Here are three ways to prevent access to Firefox’s safe mode (also called “troubleshoot mode”).

1. Set the DisableSafeMode Policy

The most effective and comprehensive way to prevent access to safe mode is to set the DisableSafeMode Firefox policy. (You should create a backup of your LeechBlock settings before you attempt this solution: Options > General > Export.)

On Windows, the policy can be set via the Registry Editor:

  • Navigate to the following registry key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox
  • Add a new value to that key:
    • Name: DisableSafeMode
    • Type: DWORD (REG_DWORD)
    • Data: 1

Warning: Do not attempt to edit the registry unless you really know what you’re doing! You should back up your registry before making any changes. The developer of LeechBlock will not be held responsible for any damage you do to your system by editing the registry.

For further information on setting Firefox policies on Windows, Mac, and Linux systems, see here.

2. Remove the Help Menu Item

You can use the userChrome browser customization file to remove the “Restart with Add-ons Disabled” or “Troubleshoot Mode” menu item from the Help menus. Carefully follow these steps:

  • Locate your Firefox profile folder.
  • Create a new folder chrome inside your profile folder (if it doesn’t already exist).
  • Create a new file userChrome.css inside that folder with the following content:
    [label^='Restart with Add-ons Disabled'] { display: none !important; }
    [label^='Troubleshoot Mode'] { display: none !important; }

You will need to close all Firefox windows and restart Firefox for it to take effect.

Note: If you’re using Firefox 69 or above, you’ll also need to go to about:config and ensure the toolkit.legacyUserProfileCustomizations.stylesheets preference is set to true (go here for more detailed instructions).

(Credit to Metaception for suggesting this solution.)

If you also want to remove the button from the about:support and about:profiles pages, create another file userContent.css inside the same folder with the following content:

#safe-mode-box { display: none !important; }
#restart-in-safe-mode-button { display: none !important; }

If you also want to remove the “Create a New Profile” button from the about:profiles page, add the following line to userContent.css:

#create-button { display: none !important; }

3. Disable the Safe Mode Key

You can set the environment variable MOZ_DISABLE_SAFE_MODE_KEY (to any value) to prevent starting Firefox in safe mode by holding down the SHIFT key.

If you’re not sure how to set an environment variable, you can find guidance here.