Mozilla.cfg only applies when using the encrypted file. The unencrypted file with the pref("general.config.obscure_value", 0) entry in the local-prefs.js file
Mozilla.cfg only applies settings when using the encrypted file version. The unencrypted mozilla.cfg (plain text) file with the pref("general.config.obscure_value", 0) entry in the local-settings.js file does not ever apply settings. I am running version 50.0.2 of Firefox on Windows 7. Is there a new method of utilizing the unencrypted version of the mozilla.cfg file, and if not, is there a CURRENT script that I can run to convert it from mozilla.txt to mozilla.cfg? Everything I have found is old and no longer works with current Perl versions, and the Autoconfigurator is based in Lithuania, but seems to be the only available way to convert the file. If you need more information, please let me know. Thanks for the help!
Solución elegida
This sounds more like a problem with the local-settings.js file.
Do you get an error message when you remove the mozilla.cfg file?
Did you try the example files listed in my above reply?
Leer esta respuesta en su contexto 👍 0Todas las respuestas (7)
I've never had a problem with using the mozilla.cfg file with general.config.obscure_value = 0.
Did you make sure that mozilla.cfg is a plain text file? You can try Unix line endings with only a linefeed (%0a). Try these base64 data: files for testing:
A local-settings.js file needs to be placed in the "defaults/pref" folder where also the channel-prefs.js file is located to specify using mozilla.cfg.
pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);
These functions can be used in the mozilla.cfg file:
defaultPref(); // set new default value pref(); // set pref, allow changes in current session lockPref(); // lock pref, disallow changes
The mozilla.cfg file needs to start with a comment line (//).
See Configuration:
Thank you for your post. Yes, the mozilla.cfg file is a plain text file when unencrypted. It was created with notepad as mozilla.txt and renamed mozilla.cfg. Also, the config file starts with a comment line (//). The local settings.js file with the entries: pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); was created and placed into the defaults / pref folder. In this configuration, it does not apply any of the settings in the config file. However, when I encrypt the original plain text file mozilla.txt with the Autoconfigurator, and use the resulting mozilla.cfg file and remove the pref("general.config.obscure_value", 0); file from the local-settings.js file, everything works fine. I will take a look at your recommendations and let you know how it goes...
Solución elegida
This sounds more like a problem with the local-settings.js file.
Do you get an error message when you remove the mozilla.cfg file?
Did you try the example files listed in my above reply?
I got it working...This issue was with the .js file, it too must begin with a comment line (//), just like the .cfg file. I found the answer in the link you provided:
https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
That was the first time I have come across any information regarding starting the local-settings.js file with a comment line. Most posts ask about ensuring starting the mozilla.cfg with a comment line, but never mention starting the local-settings.js file with one. See your above for an example... You reference the two entries for the .js file, and note that the mozilla.cfg file must start with a comment, but do not reference the same for the .js file. Note: the comment line is not necessary in the .js file if you are going to encrypt the mozilla.cfg file, but it is always necessary in the mozilla.cfg, regardless of whether or not you encrypt it.
Thank you for your help, I appreciate it!
See above for solution.
I've never had a problem with the JavaScript file not starting with a comment line. The file starts for me with the line that sets "general.config.filename" and if this line is skipped then the mozilla.cfg file shouldn't be used at all. A possible cause can be using DOS line ending convention (CR/LF) instead of a sole linefeed character because the JS file is parsed.
I don't know why it won't work without the comment line first. The following is the exact text I used in the file:
// pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);
That's it. It won't work without the comment line first...works like a champ with it. I have run into two others with this issue, and adding the comment line to the .js file fixed it.
From the link you sent me:
Customizing Firefox default preference files for more detail). The two lines that you need are: (NOTE: the first line of the .js file must be a comment indicated by a leading // which can contain any text after //)
pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);
The above is in the Configuration section of the https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment link.