Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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

  • 4 답장
  • 1 이 문제를 만남
  • 10 보기
  • 최종 답변자: 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...

글쓴이 jason.keen 수정일시

모든 댓글 (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

글쓴이 cor-el 수정일시