firefox.cfg (mozilla.cfg) is not being parsed and applied, what linux path should be used?
We are using Firefox in an enterprise environment on CentOS 7 and are going through STIG compliance. The STIG articles reference mozilla.cfg but nothing about pathing. Eventually, I came across this article:
https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig
Which suggests using autoconfig.js and firefox.cfg although no matter what paths I try, after launch about:config doesn't reflect the changes in firefox.cfg.
Path to autoconfig.js:
/usr/lib64/firefox/defaults/pref/autoconfig.js
cat autoconfig.js
pref("general.config.filename", "firefox.cfg"); pref("general.config.obscure_value", 0);
Path to firefox.cfg:
/usr/lib64/firefox/firefox.cfg
This firefox.cfg file's first line is //
この投稿は Johnny Doe により
すべての返信 (5)
Did you check the Browser Console for error messages ?
Do you get an error message when you remove firefox.cfg ? You have an ESR version, so should be able to include JavaScript, otherwise you would have to disable the sandbox.
// Components.utils.reportError("testing autoconfig.cfg");
I didn't realize the Browser Console existed. The files haven't been changed or moved. Previously, I didn't receive an error message. Upon launch of Firefox (also attached):
Failed to read the configuration file. Please contact your system administrator.
In the browser console, I see various messages about addons.xpi and langpack-gu@firefox.mozilla.org.xpi failing to install and telemetry failed pings (expected in this closed environment).
Filtering with "cfg" returns 0 results.
Do you expect Components.utils.reportError line to be added to autoconfig.js?
If you didn't see the "testing autoconfig.cfg" line in the Browser Console then this means that Firefox didn't find the firefox.cfg file.
Are you using Firefox from the Mozilla server or from the repositories ?
Try this code in autoconfig.js
// pref("general.config.filename", "autoconfig.cfg"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false);
- autoconfig.cfg and autoconfig.js need to start with a comment line (//)
- autoconfig.js needs to use Unix line endings (LF instead of CR/LF)
See also:
I'm still not clear in which file:
// Components.utils.reportError("testing autoconfig.cfg");
is expected. For this reason, I won't see the output "testing autoconfig.cfg" in the Browser Console.
I'm using Firefox from the CentOS 7 repositories:
rpm -qi firefox Name : firefox Version : 68.4.1 Release : 1.el7.centos Architecture: x86_64 Install Date: Thu 16 Jan 2020 05:12:48 AM EST Group : Unspecified Size : 240525345 License : MPLv1.1 or GPLv2+ or LGPLv2+ Signature : RSA/SHA256, Wed 15 Jan 2020 07:45:40 AM EST, Key ID 24c6a8a7f4a80eb5 Source RPM : firefox-68.4.1-1.el7.centos.src.rpm Build Date : Tue 14 Jan 2020 04:59:52 PM EST Build Host : x86-01.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : https://www.mozilla.org/firefox/ Summary : Mozilla Firefox Web browser Description : Mozilla Firefox is an open-source web browser, designed for standards compliance, performance and portability.
=
I'm using vim to create and edit the files and set fileformat is equal to unix. So they should be LF instead of CRLF.
After making changes to autoconfig.js, about:config still doesn't reflect the changes to /usr/lib64/firefox/firefox.cfg
I have a post where I try to help with debugging
https://mike.kaply.com/2016/09/08/debugging-firefox-autoconfig-problems/
The thing that was definitely missing in your first example was:
pref("general.config.sandbox_enabled", false);