On FF however I found no damn simple way to do basic things like:
- install extensions via CLI/wrappers (for instance homeManager), there are some hack but they are not reliable and Mozilla seems to try avoiding supporting such a thing;
- configure preferences, like about:config, outside firefox;
- customize ff themes in a simple manner.
Modern browsers seems to mimic the most closed commercial OSes I know of instead of mimic classic FOSS model and that's a big problem.
Today I can easily automate my entire desktop, but browsers and they demand more and more settings and third parties tools/extensions to be "at least less unsafe" for us users (from firejail/capsicum to cookies deleters, adblockers etc.
That's a horrific mess.
// DO NOT EDIT THIS FILE.
and an optional user.js separate preference I do not know how reliable...
prefs.js is the storage for the current non-default pref values. At runtime, default pref values are loaded, then prefs.js, then user.js.
You _can_ edit prefs.js and the effect will be the same as if you changed the pref in about:config, as long as you do it while Firefox is not running against that profile. If you do it while Firefox is running, your changes will be overwritten at shutdown when Firefox writes out then-current in-memory pref values.
It's a pain, but I can see the compromise. If it makes the average Firefox user more vulnerable, there's definitely a case to protect them, even at the expense of its more capable users.
In general, blocking userspace from installing extensions and otherwise running malicious code stops FF from being exploited. Blocking all of these options blocks the OS from bad behaviour, especially where the user may expect a new computer/phone to have the default behaviour.
The vendors of phones and personal computers seem to have an interest in interfering with users' internet access; perhaps it is a good decision that Firefox does not let them.
So no, actual Mozilla strategy does NOT work to stop malware's on Windows nor commercial OEMs customization, as a matter of fact made only life of pro users and admin harder and open the door for less safe setup (for instance extensions added via homeManager may not get updated by FF).
This doesn't change that a sanctioned API invites abuse far more readily than reverse-engineering, especially when spyware is less frequently updated than Firefox itself. That there isn't a sanctioned API, and that the de facto API can and does change every version, is an advantage for Firefox against potential attackers.
If this is something you are sorely lacking, Firefox has also been straightforward to modify and compile, in my experience. You can always share a patch and enjoy these features as part of a smaller community, without compromising the userbase as a whole.
End users are adult, not child, and developers are others adults with ZERO right on their software's user.
If people want safer systems better learn to avoid commercial software, nothing else can help them.
Perhaps a more fine-grained permission model is needed for cross-application changes, but I can't think of anybody actively working on it in an OS.
[AddOns]
ensure-ffpkg AddonName
[Themes]
set-default ThemeName
install ThemeA, ThemeB
[Settings]
key:val
...
and have the AddonName downloaded with GNUPG signature check from an official Mozilla repo is by far more save that demand using interactive GUIs. Simply ask at startup to accept "potentially dangerous" extensions if you specify a local .xpi file it the same.
What you describe is the classic Windows approach that have proved enough to be ineffective and only useful for commercial practice. Mozilla is formally a foundation and Firefox is formally a FOSS project...
Back when I was trying to manage the configuration of my machines by having a git repository in my home directory or using stow, I got a little upset when I found that firefox stored its configuration in a profile directory with a random prefix. Why would it make it random? It's got to be the only program to do such a thing. I cannot imagine it's for anything other than to annoy people trying to manage its configuration with tools different from their own.
I've since found a way to make the profile directory not have a random prefix, but it still requires doing the change through Firefox's GUI profile manager.
Basically they restrict browser capabilities to see entire filesystem to the minimum extent possible so an webappp can't download from you your personal ssh settings, plain-text saved passwords in home, secret porn collection etc.
https://bugzilla.mozilla.org/show_bug.cgi?id=56002 has the long discussion about it, but briefly: the profile directory name randomization was introduced to prevent web sites from being able to place data they control in known locations on your hard drive (via the browser cache) and then use that as a stepping-stone in a privilege escalation.
https://support.mozilla.org/en-US/kb/how-stop-firefox-making...
which is a perfectly reasonable and legitimate user request that, the browser not talk to the internet before the user agrees it may.
For addons and other options you can use policies.json file, see https://github.com/mozilla/policy-templates/blob/master/READ...
This is a great example of why I'm generally skeptical of these scattershot approaches to making users more secure by changing default settings in mainstream browsers. Security and privacy features always entail tradeoffs and should be designed and implemented holistically for best results.
This is why I, a privacy-conscious individual, don't follow any of these guides in my Firefox. If you follow the discussion on Bugzilla, the weekly team meeting notes, and occasionally ask respectful questions on Mozilla IRC, you come to a similar conclusion to me in that the Firefox development community is doing the right thing in not enabling this by default.
As much as I loved the browser in the past, nobody should consider running it today, without being informed of the implications. The ffprofile.com site is something I have been waiting for, but stuff like this should not be necessary and IMO Mozilla Corp. has won. Nobody celebrates a new version of FF anymore.
Also useful resources: https://github.com/amq/firefox-debloat https://support.mozilla.org/en-US/kb/how-stop-firefox-making... https://spyware.neocities.org/articles/firefox.html https://browserleaks.com/ https://www.howsmyssl.com/
This used to be impossible, and essentially made my employer banish Firefox in most cases.
https://support.mozilla.org/en-US/kb/customizing-firefox-usi...