Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Adding default settings throuh mozilla.cfg not working on firefox-26

  • 1 reply
  • 15 have this problem
  • 27 views
  • Last reply by cor-el

more options

I would like to set proxy settings to all the firefox process for non-root users, Earlier i used to do this by adding below lines in /usr/lib64/firefox/defaults/preferences/channel-perf.js

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

and creating mozilla.cfg file in /usr/lib64/firefox directory as followd

lockPref("network.proxy.type", 1); lockPref("network.proxy.http", "127.0.0.1") lockPref("network.proxy.http_port", 3128) lockPref("network.proxy.share_proxy_settings", true)


How do i achieve the same in Firefox-26

I tried the following

In the /usr/lib64/firefox/browser/defaults/preferences directory, i created file channel-pref.js as follows pref("general.config.obscure_value", 0) pref("general.config.filename", "mozilla.cfg");


create mozilla.cfg file in /usr/lib64/firefox directory , then using moz-byteshift.pl i modified the mozilla.cfg moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg

but it still doesn't work ,

Any information on how to make this work

I would like to set proxy settings to all the firefox process for non-root users, Earlier i used to do this by adding below lines in /usr/lib64/firefox/defaults/preferences/channel-perf.js pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); and creating mozilla.cfg file in /usr/lib64/firefox directory as followd lockPref("network.proxy.type", 1); lockPref("network.proxy.http", "127.0.0.1") lockPref("network.proxy.http_port", 3128) lockPref("network.proxy.share_proxy_settings", true) How do i achieve the same in Firefox-26 I tried the following In the /usr/lib64/firefox/browser/defaults/preferences directory, i created file channel-pref.js as follows pref("general.config.obscure_value", 0) pref("general.config.filename", "mozilla.cfg"); create mozilla.cfg file in /usr/lib64/firefox directory , then using moz-byteshift.pl i modified the mozilla.cfg moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg but it still doesn't work , Any information on how to make this work

All Replies (1)

more options

It is best to leave the channel-prefs.js file alone and create a specific local-settings.js file to specify using mozilla.cfg in the defaults\pref folder where you also find the channel-prefs.js file.

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

See:

These functions can be used in the mozilla.cfg file:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes

Note that only the first pref line you posted is ending with a semi colon.
Also make sure that the first line of mozilla.cfg is a comment line as this line is always skipped.

//
lockPref("network.proxy.type", 1);
lockPref("network.proxy.http", "127.0.0.1");
lockPref("network.proxy.http_port", 3128);
lockPref("network.proxy.share_proxy_settings", true);