firefoxincognito-mode

How to permanently disable private browsing in Firefox?


I am using Ubuntu 20.04 and Firefox 91.0. I want to disable permanently the private browsing (incognito mode).

Especially, I want to stop the keyboard shortcut from working.

How can I do that?


Solution

  • Follow the recipe:

    Obs.: This is the correct directory if you are using Firefox version 91.0 and Ubuntu 20.04. Depending on the Firefox version and/or OS this might be different.

     $ sudo touch policies.json
    
    {
      "policies": {
        "DisablePrivateBrowsing": true
      }
    }
    
    $ sudo emacs policies.json 
    $ sudo vim policies.json 
    $ sudo gedit policies.json