Putting about:config under git version control
I am enjoying the benefits of keeping configuration files for most of my programs under git version control. FF is basically the only program I don't have under git. My question is, what would be the best way to have the contents of about:config under git control. My research suggested the creation of a juser.js. However, in the past I observed that with newer versions of FF, the names of preferences sometimes change, or they disappear from FF. If I am informed correctly, if a preference in user.js is not understood by FF, then all the preferences below won't be applied. I am a bit worried, that if such a change in FF happens without me noticing, then certain security settings that I use might not be applied anymore.
So is there a better way than a user.js to use git for my about:config? If not, what would I have to be cautious about?
jaccw द्वारा
All Replies (2)
Assuming you want all of the settings as-is in a flat file, put the following file under git control:
~/.mozilla/firefox/{userhash}.default/prefs.js
If you wish to only have modified values from that in a flat file you can do the following:
grep 'foo|bar|baz' ~/.mozilla/firefox/{userhash}.default/prefs.js | tee > {git_controlled_flat_file}
i.e.:
``` $ grep security ~/.mozilla/firefox/0doi9cgd.default/prefs.js | tee > ~/Firefox-security.changes $ cat ~/Firefox-security.changes user_pref("browser.security.newcerterrorpage.enabled", true); user_pref("security.csp.experimentalEnabled", true); user_pref("security.enterprise_roots.enabled", true); user_pref("security.insecure_connection_icon.enabled", true); user_pref("security.insecure_connection_text.enabled", true); user_pref("security.insecure_connection_text.pbmode.enabled", true); user_pref("security.mixed_content.block_display_content", true); user_pref("security.mixed_content.block_object_subrequest", true); user_pref("security.mixed_content.upgrade_display_content", true); user_pref("security.sandbox.content.tempDirSuffix", "a08d9a5f-896f-{REDACTED}"); user_pref("security.ssl.errorReporting.automatic", true); user_pref("security.ssl.require_safe_negotiation", true); user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true); user_pref("security.webauth.u2f", true); user_pref("security.webauth.webauthn_enable_softtoken", true); ```