X
Trykk her for å gå til den mobile utgaven av nettstedet.

Brukerstøtteforum

firefox.cfg (mozilla.cfg) is not being parsed and applied, what linux path should be used?

Skrevet

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 //

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 //

Endret av Johnny Doe

Quote

Flere systemdetaljer

Installerte programtillegg

None other than what came with the browser

Applikasjon

  • Brukeragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Mer informasjon

cor-el
  • Top 10 Contributor
  • Moderator
17775 løsninger 160795 svar

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");
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");
Var dette hjelpsomt for deg?
Quote

Eieren av spørsmålet

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?

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?
Var dette hjelpsomt for deg?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17775 løsninger 160795 svar

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:

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 ? *https://www.mozilla.org/en-US/firefox/all/ ---- Try this code in autoconfig.js <pre><nowiki>// pref("general.config.filename", "autoconfig.cfg"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false); </nowiki></pre> ---- *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: *https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig
Var dette hjelpsomt for deg?
Quote

Eieren av spørsmålet

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'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
Var dette hjelpsomt for deg?
Quote
Mike Kaply
  • Moderator
40 løsninger 210 svar

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);

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);
Var dette hjelpsomt for deg?
Quote
Still et spørsmål

Du må logge inn på kontoen din for å svare på meldinger. Still et nytt spørsmål dersom du ikke har en konto ennå.