Disable Private Browsing in Firefox (Mac)
Recently I needed to disable "private browsing" on one of my computers. Of course my first course of action was scouring Google. I found a variety of answers from "it's not possible" to "use a plug-in."
Not feeling super hopeful, I did try searching plugins and add-ons, but found nothing that would work. Back to Google.
I finally stumbled across this Github repo about setting application policies which had a policy for "DisablePrivateBrowsing". It appeared it may be possible by editing the Firefox plist file.
These Mac specific instructions got me going in the right direction. Here are the steps I ultimately took. I should note, I'm running Firefox 80.0.1.
First, I enabled [enterprise] policies. From terminal, I ran this command:
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE
After policies were enabled, I just needed to run the specific command to set the "DisablePrivateBrowsing" policy.
sudo defaults write /Library/Preferences/org.mozilla.firefox DisablePrivateBrowsing -bool TRUE
If Firefox is running, quit and restart. From "File," the option for a "new private window" should no longer be available. 🎉
Bonus for Chrome
defaults write com.google.chrome IncognitoModeAvailability -integer 1
After you're done, restart your Mac for the changes to take effect.