Disable private browsing (incognito mode) permanently in Firefox (Ubuntu 20.04)
I learned this here with @mkaply.
Follow the recipe:
-
- In terminal, go to:
/usr/lib/firefox/distribution
- In terminal, go to:
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.
-
- If there is no
policies.json
file, then create one:
- If there is no
$ sudo touch policies.json
-
- The file's content needs to be:
{
"policies": {
"DisablePrivateBrowsing": true
}
}
-
- If you are facing problems with "read-only", invoke your favorite editor using sudo, such as:
$ sudo emacs policies.json
$ sudo vim policies.json
$ sudo gedit policies.json
-
- Re-start firefox and try using
Control-Shift-P
. Hopefully, it won't work.
- Re-start firefox and try using