Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

Mozilla.cfg file is not loading in my 21.0 version; how can I customize deployment?

  • 31 odpovědí
  • 9 má tento problém
  • 20 zobrazení
  • Poslední odpověď od cor-el

more options

I need to deploy a customized configuration for a limited access network, and have created a custom mozilla.cfg file. It appears as though mozilla.cfg is not being read. I have intentionally created errors in the local-settings.js file, and it will throw errors (even when it cannot find the mozilla.cfg file). When I create errors in the mozilla.cfg file, however, no errors are thrown and no changes are made to the applications configuration.

I need to deploy a customized configuration for a limited access network, and have created a custom mozilla.cfg file. It appears as though mozilla.cfg is not being read. I have intentionally created errors in the local-settings.js file, and it will throw errors (even when it cannot find the mozilla.cfg file). When I create errors in the mozilla.cfg file, however, no errors are thrown and no changes are made to the applications configuration.

Všechny odpovědi (20)

more options

hello jbryant, please see if the following blog entry might apply to your situation: http://mike.kaply.com/2013/05/13/more-major-changes-coming-in-firefox-21/

more options

Hello Philipp,

 No, these changes do not apply to my situation.  Just for a test I moved the mozilla.cfg file to the pref folder, I received an error that the file could not be found.  All indications are that the file is checked for existence, but not read.  I try to set a specific startup page, but it continues to use the firefox default startup page.
more options
more options

Philipp,

 Maybe I am missing it, but I do not see browserconfig.properties file on the system.  And, I don't see an entry in the config.cfg file for the about:home page.
more options

I've discovered that I can set the home page in the prefs.js file in the profile folder, however, this does not help me. I need to be able to set the home page for all users.

more options

Ok, I have one question, is there a set of documents for FF 21.0 giving: what files are use? Where they can be found? And available settings?

I have a install.cmd file that works great, local-settings.js is in place and working along with override.ini. However, mozilla.cfg is not being read (or settings are not taking effect), proxy settings are not set among other settings.

more options

Where did you place the local-settings.js file?

Can you post the content of the mozilla.cfg file?

This file is run as a JavaScript file with full permissions, so any errors that throw an exception makes the processing fail to complete properly.

more options

The local-settings.js file is in the "defaults\pref" folder, and the below content is what I currently have in the mozilla.cfg file. I have another that has more switches, however, the one below is what I have been testing with to try and get it to work.

//Firefox  Settings
//
Try {

// set Firefox Default homepage
lockPref("browser.startup.homepage_override.mstone", "ignore");
lockPref("browser.startup.homepage","file:///c:/dvinst/ie/localpage.html");

// default proxy settings
lockPref("network.proxy.type", 1);
lockPref("network.proxy", 192.168.100.1);
lockPref("network.proxy.http_port", 8080);
lockPref("network.proxy.share_proxy_settings", true);

// disable default browser check
lockPref("browser.shell.checkDefaultBrowser", false);
lockPref("browser.startup.homepage_override.mstone", "ignore");

// disable password caching
lockPref("signon.rememberSignons", False);
lockPref("signon.prefillForms", False);

// disable application updates
lockPref("update_notifications.enabled", false);
lockPref("app.update.auto", False);
lockPref("app.update.enabled", false);
lockPref("app.update.service.enabled", false);

// disables the 'know your rights' button from displaying on first run 
lockPref("browser.rights.override", true);

// disables the request to send performance data from displaying
lockPref("toolkit.telemetry.prompted", false);
lockPref("toolkit.telemetry.rejected", true);

} catch(e) {
displayError("Mozilla: ", e);
}

Upravil uživatel cor-el dne

more options

Some remarks:

  • You wrote 'Try {' with a capital.
  • The value of these prefs is a string value and thus requires quotes:
    lockPref("network.proxy", 192.168.100.1);
    lockPref("network.proxy.http_port", 8080);
  • true/false also need to be lowercase.

toolkit.telemetry.prompted is an integer pref as you can see on the about:config page

  • lockPref("toolkit.telemetry.prompted", 2);

Note that you have this line twice:

  • lockPref("browser.startup.homepage_override.mstone", "ignore");
//Firefox  Settings
//
try {

// set Firefox Default homepage
lockPref("browser.startup.homepage_override.mstone", "ignore");
lockPref("browser.startup.homepage","file:///c:/dvinst/ie/localpage.html");

// default proxy settings
lockPref("network.proxy.type", 1);
lockPref("network.proxy.http", "192.168.100.1");
lockPref("network.proxy.http_port", 8080);
lockPref("network.proxy.share_proxy_settings", true);

// disable default browser check
lockPref("browser.shell.checkDefaultBrowser", false);
//lockPref("browser.startup.homepage_override.mstone", "ignore");

// disable password caching
lockPref("signon.rememberSignons", false);
lockPref("signon.prefillForms", false);

// disable application updates
lockPref("update_notifications.enabled", false);
lockPref("app.update.auto", false);
lockPref("app.update.enabled", false);
lockPref("app.update.service.enabled", false);

// disables the 'know your rights' button from displaying on first run 
lockPref("browser.rights.override", true);

// disables the request to send performance data from displaying
lockPref("toolkit.telemetry.prompted", 2);
lockPref("toolkit.telemetry.rejected", true);

} catch(e) {
displayError("Mozilla: ", e);
}

Upravil uživatel cor-el dne

more options

You may want to look at the Firefox Health Report prefs as well.

  • datareporting.healthreport.service.enabled
  • datareporting.healthreport.uploadEnabled
more options

cor-rel,

 Thanks, I make these changes and try them out.  Is there a way to set the homepage outside of the prefs.js in the profile?
more options

have you gone through the link i've posted above about "Setting the Default Firefox Homepage with Autoconfig "?

edit: ok, i've gone trough it myself now & it doesn't apply when you want to lock the startpage, only when you want to set your own that should get restored when the user hits that button,,,

Upravil uživatel philipp dne

more options

cor-el,

 I have made your recommended changes, however, proxy settings are still not set.

philipp,

 The only success I have had with setting the homepage is to wait for the user to open FF; the profile needs to be created first.  Then I can run a script to set the homepage in the prefs.js file.
 Is there not a single location within FF to set the configuration globally?  Or, is it the mozilla.cfg file, and it is a bug in 21.0 that the file is not being read?
more options

mozilla.cfg IS the central location to lock preferences - when i try it with the content cor-el has posted above it all works for me as intended (except for lockPref("network.proxy.http_port", 8080); which is an integer and doesn't need quotes).

you wrote: I have made your recommended changes, however, proxy settings are still not set. - are only proxy settings not applied, and the other settings from mozilla.cfg work as intended or is nothing showing up? in the latter case please make sure that the mozilla.cfg is located in the same location as firefox.exe & that the content of \defaults\pref\local-settings.js is the same as described here: http://kb.mozillazine.org/Locking_preferences

more options

philipp,

 Thanks for the feedback, I wish I knew the secret.  I have uninstalled, and re-installed with the same mozilla.cfg file.  I still get all of the defaults.
more options

philipp/cor-el,

 When I load the proxy settings for each protocol in the prefs.js file the settings take.  However, it does not matter what combination I use (each protocol, or one for all) in the mozilla.cfg, the settings do not take.

I just wanted to let you know what I have seen.

more options

would there be a way for you to upload your current local-settings.js & mozilla.cfg files onto some sort of file-locker and provide the links here (or per PM to cor-el and me)? maybe something will catch our eyes this way...

more options

philipp,

 This was my test, I stripped everything out of mozilla.cfg to ensure that I was not running into conflicts that were not reported.

local-settings.js

//pref("general.config.obscure_value",0); pref("general.config.filename", "mozilla.cfg");


mozilla.cfg

lockPref("network.proxy.ftp", "192.168.200.1"); lockPref("network.proxy.ftp_port", 9119); lockPref("network.proxy.http", "192.168.200.1"); lockPref("network.proxy.http_port", 9119); lockPref("network.proxy.socks", "192.168.200.1"); lockPref("network.proxy.socks_port", 9119); lockPref("network.proxy.ssl", "192.168.200.1"); lockPref("network.proxy.ssl_port", 445); lockPref("network.proxy.type", 1);

more options

it works fine for me when i put that content into \defaults\pref\local-settings.js and \mozilla.cfg here on my machine, so unfortunately there's no obvious fix that i could suggest ...

more options

Do all other settings in the prefs.js file take?

One slight error in the mozilla.cfg file will make processing stop, so try to comment out all lines with // and re-enable them in groups to see when it stops working.

  1. 1
  2. 2