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

Natao arisiva ity resaka mitohy ity. Mametraha fanontaniana azafady raha mila fanampiana.

How to save about:config for a new Installation?

more options

I made a few changes to about:config. How can i save the about:config settings for a new Firefox installation? My bet is this is possible either with distribution-policies.json or with a HTML. I used Kali Linux, this operating system comes with a pre-configured Firefox installation. For example it uses a permanent darkmode with duckduckgo even while cookies are denied. It also comes with customs about:config settings like disabled telemetry.

Those are all the setting i changed and i would like to find out a permanent way to import them to Firefox, right after installaing the Browser. It's time consuming changing each setting manually after each install...

toolkit.telemetry.enabled false browser.urlbar.placeholderName DuckDuckGo app.update.enabled false geo.enable false extensions.pocket.enabled false pref.privacy.disable_button.view_passwords false network.protocol-handler.external.mailto false datareporting.policy.dataSubmissionEnabled false datareporting.healthreport.uploadEnabled false browser.newtabpage.activity-stream.feeds.telemetry false browser.newtabpage.activity-stream.telemetry false browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint leer browser.newtabpage.activity-stream.telemetry.ut.events false browser.ping-centre.telemetry false toolkit.telemetry.archive.enabled false toolkit.telemetry.bhrPing.enabled false toolkit.telemetry.firstShutdownPing.enabled false toolkit.telemetry.hybridContent.enabled false toolkit.telemetry.newProfilePing.enabled false toolkit.telemetry.reportingpolicy.firstRun false toolkit.telemetry.server leer toolkit.telemetry.server_owner leer toolkit.telemetry.shutdownPingSender.enabled false toolkit.telemetry.shutdownPingSender.enabledFirstSession false toolkit.telemetry.updatePing.enabled false toolkit.telemetry.unified false toolkit.telemetry.prompted false toolkit.telemetry.rejected true toolkit.telemetry.pioneer-new-studies-available false experiments.activeExperiment false experiments.enabled false experiments.supported false network.allow-experiments false media.peerconnection.enabled false (WebRTC leaks)

If you know any more settings that shuld be disabled, please let me know!

I made a few changes to about:config. How can i save the about:config settings for a new Firefox installation? My bet is this is possible either with distribution-policies.json or with a HTML. I used Kali Linux, this operating system comes with a pre-configured Firefox installation. For example it uses a permanent darkmode with duckduckgo even while cookies are denied. It also comes with customs about:config settings like disabled telemetry. Those are all the setting i changed and i would like to find out a permanent way to import them to Firefox, right after installaing the Browser. It's time consuming changing each setting manually after each install... toolkit.telemetry.enabled false browser.urlbar.placeholderName DuckDuckGo app.update.enabled false geo.enable false extensions.pocket.enabled false pref.privacy.disable_button.view_passwords false network.protocol-handler.external.mailto false datareporting.policy.dataSubmissionEnabled false datareporting.healthreport.uploadEnabled false browser.newtabpage.activity-stream.feeds.telemetry false browser.newtabpage.activity-stream.telemetry false browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint leer browser.newtabpage.activity-stream.telemetry.ut.events false browser.ping-centre.telemetry false toolkit.telemetry.archive.enabled false toolkit.telemetry.bhrPing.enabled false toolkit.telemetry.firstShutdownPing.enabled false toolkit.telemetry.hybridContent.enabled false toolkit.telemetry.newProfilePing.enabled false toolkit.telemetry.reportingpolicy.firstRun false toolkit.telemetry.server leer toolkit.telemetry.server_owner leer toolkit.telemetry.shutdownPingSender.enabled false toolkit.telemetry.shutdownPingSender.enabledFirstSession false toolkit.telemetry.updatePing.enabled false toolkit.telemetry.unified false toolkit.telemetry.prompted false toolkit.telemetry.rejected true toolkit.telemetry.pioneer-new-studies-available false experiments.activeExperiment false experiments.enabled false experiments.supported false network.allow-experiments false media.peerconnection.enabled false (WebRTC leaks) If you know any more settings that shuld be disabled, please let me know!

Vahaolana nofidina

You leave the value blank (i.e. clear it by removing all the characters) on the about:config page. This translates to "" for a String pref as stored in prefs.js as you can check by inspecting the file and you need to use the same in autoconfig.cfg. You always need the enclose a String pref with double quotation marks. Easiest is always to make the change on about:config if you aren't sure and then copy the line from prefs.js to the autoconfig.cfg file and modify user_pref() to the desired function.

  • lockPref("browser.urlbar.placeholderName", "DuckDuckGo");
  • lockPref("browser.urlbar.placeholderName.private", "DuckDuckGo");
  • lockPref("toolkit.telemetry.server", "");

Keep in mind that you won't be able to change any of the prefs you lock apart from modifying autoconfig.cfg and restarting Firefox. In a lot of cases is defaultpref() or pref() sufficient to ensure the value of a pref when you start Firefox. A website can't modify a pref that isn't locked via JavaScript, so only you or someone else that uses the computer can do this via about:config or via Settings (you can lock access to about:config via policies.json).

Hamaky an'ity valiny ity @ sehatra 👍 1

All Replies (14)

more options

We do not recommend making that many changes to prefs on the about:config page and it is up to you to accept possible issues/risks. You can use a user.js file in the profile folder to initialize prefs each time Firefox starts.

The user.js file is read each time Firefox is started and initializes preferences to the value specified in this file, so preferences set via user.js can only be changed temporarily for the current session (you can possibly use user.js only once and then rename/remove it).

more options

First off, when going to about:config you have to confirm "i accept the risk" no need to tell me that again. Geolocation tracking, telemetry, web rtc leaks, adversting, those are ALL bad things. Ofcourse i will turn them off without a doubt. I dont have any issues with those custom settings and making those changes wouldnt be necessary in the first place if firefox would use those settings by default, which it should but does not.

Creating a user.js file that is being read at the start of the browser to load custom settings sounds good, but being able to use it only once sounds like a really bad joke. Obviously this is not an option. What about the distribution folder inside the firefox installation directory, i created a policies.json file there. All i need to know is how to i get my settings from about:config into the policies.json. It could be simple as copy and paste but that wont work since policies.json is not a simple text-document, but in fact uses a specific "layout/style".

For example to disable updates one has to use this policie:

{ "policies":

 {
   "DisableAppUpdate": true
  }

}

How can i use the about:config settings just like it works with the update?

more options

So you are telling me to leave the telemtry enable because its not recommended changing to many settings? Oh, well time to find a new "privacy browser". Lets see if Brave does any better.

more options

How sad, instead of a helpful reply i get bullied. And now, there are no more replys. Great support for sure.

more options

this screenshot litterally proves it is possible to pre-define setting in about:config

HOW CAN I DO IT ?

more options

You can still use a user.js file in the profile folder to initialize prefs each time you start Firefox.

You can also do this globally for all profiles, see:

Novain'i cor-el t@

more options

cor-el said

You can still use a user.js file in the profile folder to initialize prefs each time you start Firefox. You can also do this globally for all profiles, see:

Thank you! Now i can get to work!

What do you mean by "globaly for all profiles"? I am the only user on this device, does a single user have multiple profiles? I asume the defaut one and the customised one?

As an exmaple, if i want to initialise custom setting for firefox by using the autoconfig.js and firefox.cfg what exactly do i have to do, to set geo.enable to false? How exactly do i translate geo.enable from about config to the proper format that is required with the -js or .cfg?

I mean to avoid confusion, i would simply open the autoconfig.js and paste "geo.enable false" in there, but obviously this wont work, i have to use a different format, can you please give me one example so i can handle this myself?

more options

Pref.js and user.js use a user_pref("pref-name", value); format to set a pref as you can see if you inspect prefs.js and these files are interpreted/parsed. The autoconfig.cfg file is actually run as privileged JavaScript code and any errors in this file throw an error and cause Firefox to display an error message (the Browser Console gives more detail in this case). In autoconfig.cfg you need to use defaultPref() or pref() or lockPref() instead of user_pref() depending on what you intend as you can read in the article.


You can use the autoconfig.cfg file in the Firefox installation folder to initialize (set/lock) preferences and run privileged JavaScript code.

To use Autoconfig, place two files into the Firefox installation directory.

  • on Windows, they go into the same directory where Firefox is installed

The autoconfig.js file that specifies to use autoconfig.cfg is placed into the "defaults\pref" directory where the channel-prefs.js file is located.

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

The autoconfig.cfg file is placed at the top level of the Firefox directory.

These functions can be used in autoconfig.cfg:

defaultPref();	// set new default value, requires special data: format for localized prefs
pref();	// set pref, allow changes in current session
lockPref();	// lock pref, disallow changes
  • autoconfig.cfg and autoconfig.js need to start with a comment line (//)
  • autoconfig.js needs to use Unix line endings (LF instead of CR/LF)
more options

I already read that information when you first sent me the link in the upper reply. The thing is i dont understand what's written there. It's like a different language, like programmer language to me. Which i am clearly not.

Not all of it is complicated but i dont understand many parts of what's being explained there. For exmaple some of the first lines already gets me in troubble... Quote: "The autoconfig.js file must use Unix end-of-line (LF), even on Windows systems with Firefox 60 or higher." What?? Unix end-of-line (LF) What's that suposed to mean exactly?

So far i couldnt do much becasue i dont know how to continue.. I created and placed autoconfig.js into C:\Program Files\Mozilla Firefox\defaults\pref as described. But than again this is a little complicated for me. Quote: "The second line indicates that the AutoConfig should not be obscured. By default, Firefox expects the file to be byte shifted by 13 bytes in order to obfuscate it. " How could it be "obscured" what is that supposed to mean? And also, byte shifted by 13 bytes? What? How could i shift it by 12 or 14? There is alot of information, but i only understand half of it..

Next we have firefox.cfg which i created and placed as described into C:\Program Files\Mozilla Firefox And yes, i did copy paste this code: pref("general.config.filename", "firefox.cfg"); pref("general.config.obscure_value", 0); into autoconfig.js And also did copy paste this code: // IMPORTANT: Start your code on the 2nd line into firefox.cfg

Reading the Functions of AutoConfig i asume what i must do now to accomplish what i wanted to do originaly, either use "defaultPref(prefName, value)" or "lockPref(prefName, value)" At the end both options will do the same thing, change a setting each time the browser is started? Just with the difference that lock will grey-out the setting and default will only change it without making it greyed out? Also, i noticed in C:\Program Files\Mozilla Firefox\defaults\pref is another js file, channel-prefs.js Why cant i simply edit the channel-prefs.js and put my prefs in there, why do i need the autoconfig.js? What does // stand for? Or hold on.. do i have to put my prefs into autoconfig.js ? No..? I dont think so, propably i have to use firefox.cfg for that, right? Let me make that final guess.. this is what i have to write into firefox.cfg (or maybe autoconfig.js)... lockPref("geo.enable", "false"); lockPref("geo.enable", false); Which one i the right one, if even any..? Will that work? Is it correct? I will just try it out right away but i will be thankful if you can explain all the questions i had...

more options

Are there two options on geolocation tracking?

Novain'i Firefox_Beginner t@

more options

Got things working now. Expect; So far it was easy to to make use of the "false and true" setting. But what if i want to leave a setting blank or enter some specific value? Example; lockPref("geo.enable", false); That was an easy one, but how can i correctly set those below? lockPref("browser.urlbar.placeholderName", DuckDuckGo); lockPref("toolkit.telemetry.server", BLANK);

more options

Vahaolana Nofidina

You leave the value blank (i.e. clear it by removing all the characters) on the about:config page. This translates to "" for a String pref as stored in prefs.js as you can check by inspecting the file and you need to use the same in autoconfig.cfg. You always need the enclose a String pref with double quotation marks. Easiest is always to make the change on about:config if you aren't sure and then copy the line from prefs.js to the autoconfig.cfg file and modify user_pref() to the desired function.

  • lockPref("browser.urlbar.placeholderName", "DuckDuckGo");
  • lockPref("browser.urlbar.placeholderName.private", "DuckDuckGo");
  • lockPref("toolkit.telemetry.server", "");

Keep in mind that you won't be able to change any of the prefs you lock apart from modifying autoconfig.cfg and restarting Firefox. In a lot of cases is defaultpref() or pref() sufficient to ensure the value of a pref when you start Firefox. A website can't modify a pref that isn't locked via JavaScript, so only you or someone else that uses the computer can do this via about:config or via Settings (you can lock access to about:config via policies.json).

more options

cor-el said

You leave the value blank (i.e. clear it by removing all the characters) on the about:config page. This translates to "" for a String pref as stored in prefs.js as you can check by inspecting the file and you need to use the same in autoconfig.cfg. You always need the enclose a String pref with double quotation marks. Easiest is always to make the change on about:config if you aren't sure and then copy the line from prefs.js to the autoconfig.cfg file and modify user_pref() to the desired function.
  • lockPref("browser.urlbar.placeholderName", "DuckDuckGo");
  • lockPref("browser.urlbar.placeholderName.private", "DuckDuckGo");
  • lockPref("toolkit.telemetry.server", "");
Keep in mind that you won't be able to change any of the prefs you lock apart from modifying autoconfig.cfg and restarting Firefox. In a lot of cases is defaultpref() or pref() sufficient to ensure the value of a pref when you start Firefox. A website can't modify a pref that isn't locked via JavaScript, so only you or someone else that uses the computer can do this via about:config or via Settings (you can lock access to about:config via policies.json).

Thank you so much! You helped me alot. I would already mark this as solved but can i ask one more thing, about Encrypted ESNI. You said,

ESNI is deprecated and is replaced by ECH (Encrypted Client Hello). https://blog.mozilla.org/security/2021/01/07/encrypted-client-hello-the-future-of-esni-in-firefox/ https://blog.cloudflare.com/encrypted-client-hello/

Is it possible at the current data to pass all four tests with the cloudflare browser check? Since ESNI is replaced, how can i use encrypted client instead? is it yet available?