Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Why can't firefox read my mozilla.cfg file?

  • 4 risposte
  • 1 ha questo problema
  • 10 visualizzazioni
  • Ultima risposta di cor-el

more options

Hi, I have created a local-settings .js file and placed it into C:\Program Files (x86)\Mozilla Firefox\defaults\pref it contains the following.

// use this to disable the byte-shift pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);

Then I created a mozilla.cfg file and placed it into C:\Program Files (x86)\Mozilla Firefox it contains the following.

// Set default homepage - users can change defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://sharepoint.mydomain.org.uk | http://www.mywebsite.org.uk");

//Allow NTLM to proxies defaultPref("network.automatic-ntlm-auth.allow-proxies", true);

//Proxy settings defaultPref("network.proxy.http", smoothwall.mydomain.org.uk); defaultPref("network.proxy.http_port", 8080);

//No proxy for defaultPref("network.proxy.no_proxies_on", localhost, 127.0.0.1, 192.168.3.1, smoothwall.mydomain.org.uk, HAP.mydomain.org.uk, 192.168.3.85, *.mydomain.org.uk, sharepoint.mydomain.org.uk);

//Allow NTLM for defaultPref("network.automatic-ntlm-auth.trusted-uris", https://sharepoint.mydomain.org.uk, sharepoint.mydomain.org.uk);

Now when I open Firefox I am seeing the Failed to read configuration file. message.

I cant seem to work out what is wrong with my configuration file...

Hi, I have created a local-settings .js file and placed it into C:\Program Files (x86)\Mozilla Firefox\defaults\pref it contains the following. // use this to disable the byte-shift pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); Then I created a mozilla.cfg file and placed it into C:\Program Files (x86)\Mozilla Firefox it contains the following. // Set default homepage - users can change defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://sharepoint.mydomain.org.uk | http://www.mywebsite.org.uk"); //Allow NTLM to proxies defaultPref("network.automatic-ntlm-auth.allow-proxies", true); //Proxy settings defaultPref("network.proxy.http", smoothwall.mydomain.org.uk); defaultPref("network.proxy.http_port", 8080); //No proxy for defaultPref("network.proxy.no_proxies_on", localhost, 127.0.0.1, 192.168.3.1, smoothwall.mydomain.org.uk, HAP.mydomain.org.uk, 192.168.3.85, *.mydomain.org.uk, sharepoint.mydomain.org.uk); //Allow NTLM for defaultPref("network.automatic-ntlm-auth.trusted-uris", https://sharepoint.mydomain.org.uk, sharepoint.mydomain.org.uk); Now when I open Firefox I am seeing the Failed to read configuration file. message. I cant seem to work out what is wrong with my configuration file...

Modificato da jason.keen il

Tutte le risposte (4)

more options

You forgot some quotes in the defaultPref lines that have a String value.

// Set default homepage - users can change
defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://sharepoint.mydomain.org.uk | http://www.mywebsite.org.uk");

//Allow NTLM to proxies
defaultPref("network.automatic-ntlm-auth.allow-proxies", true);

//Proxy settings
defaultPref("network.proxy.http", "smoothwall.mydomain.org.uk");
defaultPref("network.proxy.http_port", 8080);

//No proxy for
defaultPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, 192.168.3.1, smoothwall.mydomain.org.uk, HAP.mydomain.org.uk, 192.168.3.85, *.mydomain.org.uk, sharepoint.mydomain.org.uk");

//Allow NTLM for
defaultPref("network.automatic-ntlm-auth.trusted-uris", "https://sharepoint.mydomain.org.uk, sharepoint.mydomain.org.uk"); 
more options

Remember that the mozilla.cfg is run as a JavaScript file with full chrome privileges and any error in the file will throw an error and give you the error message that you got (failed ot read the configuration file).

Easiest to troubleshoot such issues is to comment out lines or use a try and catch block to be able to log error messages.

more options

Thanks, where? I'm not sure I get what you mean? And how do I comment out lines and catch block?

cor-el said

You forgot some quotes in the defaultPref lines that have a String value.
// Set default homepage - users can change
defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=https://sharepoint.mydomain.org.uk | http://www.mywebsite.org.uk");

//Allow NTLM to proxies
defaultPref("network.automatic-ntlm-auth.allow-proxies", true);

//Proxy settings
defaultPref("network.proxy.http", "smoothwall.mydomain.org.uk");
defaultPref("network.proxy.http_port", 8080);

//No proxy for
defaultPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, 192.168.3.1, smoothwall.mydomain.org.uk, HAP.mydomain.org.uk, 192.168.3.85, *.mydomain.org.uk, sharepoint.mydomain.org.uk");

//Allow NTLM for
defaultPref("network.automatic-ntlm-auth.trusted-uris", "https://sharepoint.mydomain.org.uk, sharepoint.mydomain.org.uk"); 
more options

Edit: I've edited the try/catch example with easier to use code.

I've added the quotes in my above reply. You can compare my reply to what you posted above or use my version instead to test if it works.

You wrote:

//Proxy settings
defaultPref("network.proxy.http", smoothwall.mydomain.org.uk);  

No quotes around: smoothwall.mydomain.org.uk With quotes added:

defaultPref("network.proxy.http", "smoothwall.mydomain.org.uk");

Remember that all string pref values need to be quoted.


Example of a try and catch: var test1 = "network.proxy.http"; try{defaultPref(test1, smoothwall.mydomain.org.uk); clearPref(test1+".log"); }catch(e){pref(test1+".log", e.toString())}

Response in the network.proxy.http.log pref:

network.proxy.http.log: ReferenceError: smoothwall is not defined

Modificato da cor-el il