X
Tap here to go to the mobile version of the site.

ஆதரவு மன்றம்

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

  • 5 replies
  • 2 இந்த பிரச்னைகள் உள்ளது
  • Last reply by Mike Kaply
பதிவிடப்பட்டது

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

Johnny Doe மூலமாக திருத்தப்பட்டது

மேற்கோள்

Additional System Details

நிறுவப்பட்ட நிரல்கள்

None other than what came with the browser

பயன்பாடு

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

கூடுதல் தகவல்

cor-el
  • Top 10 Contributor
  • Moderator
17775 தீர்வுகள் 160795 பதில்கள்
பதிவிடப்பட்டது

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");
இது உங்களுக்கு பயனுள்ளதாக இருந்ததா?
மேற்கோள்
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

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?
இது உங்களுக்கு பயனுள்ளதாக இருந்ததா?
மேற்கோள்
cor-el
  • Top 10 Contributor
  • Moderator
17775 தீர்வுகள் 160795 பதில்கள்
பதிவிடப்பட்டது

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
இது உங்களுக்கு பயனுள்ளதாக இருந்ததா?
மேற்கோள்
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

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
இது உங்களுக்கு பயனுள்ளதாக இருந்ததா?
மேற்கோள்
Mike Kaply
  • Moderator
40 தீர்வுகள் 210 பதில்கள்
பதிவிடப்பட்டது

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);
இது உங்களுக்கு பயனுள்ளதாக இருந்ததா?
மேற்கோள்
கேள்வி எழுப்பு

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.