Responsive image
Date 2025-10-21 12:00

I recently discovered that Mozilla has been shipping AI in Firefox. If you are okay with AI in your Firefox, you can likely ignore this blog post.

Otherwise, here are some steps I took to permanently keep settings locked to disable the AI stuff in Firefox.

First off, I run Firefox in ~/firefox/fx-stable/. This is where I un-targzip my Firefox installation. I don't compile it. I just run the pre-built binary from Firefox's website.

Secondly, I use the default path for Firefox profiles: ~/.mozilla/firefox/. This is where Firefox stores profiles by default on Linux.

To get started:

  1. Create a file called local-settings.js in your Firefox installation/run directory in the subdirectory defaults/pref/, for me it is: ~/firefox/fx-stable/defaults/pref/
    1. It should be the same place the channel-prefs.js file is located, if that helps.
  2. In this file put:
pref("general.config.obscure_value", 0); // only needed if you do not want to obscure the content with ROT-13
pref("general.config.filename", "mozilla.cfg");
  1. Create a file named mozilla.cfg in your Firefox installation/run directory, for me it is: ~/firefox/fx-stable/
  2. In this file put, (note the extra space at the top, if you put the lockPref on the first line, Firefox seems to ignore it):
// lock preferences
// extra space
lockPref("browser.ml.enable", false);
lockPref("browser.ml.enabled", false);
lockPref("browser.ml.chat.enable", false);
lockPref("browser.ml.chat.enabled", false);
lockPref("browser.ml.chat.menu", false);
lockPref("browser.ml.chat.page", false);
lockPref("browser.ml.chat.page.footerBadge", false);
lockPref("browser.ml.chat.page.menuBadge", false);
lockPref("browser.ml.chat.shortcuts", false);
lockPref("browser.ml.chat.shortcuts.custom", false);
lockPref("browser.ml.chat.sidebar", false);
lockPref("browser.ml.linkPreview.shift", false);
lockPref("browser.ml.linkPreview.enabled", false);
lockPref("browser.ml.pageAssist.enabled", false);
lockPref("browser.tabs.groups.smart.enabled", false);
lockPref("browser.tabs.groups.smart.userEnabled", false);
lockPref("extensions.ml.enabled", false);
  1. Then launch Firefox
  2. Go to about:config, and search for any of the values listed in the mozilla.cfg file.
  3. Verify it is set to false and it is in italics, with a lock symbol. This means it can't be changed.

If you need to update or remove a value at a later time, just edited the mozilla.cfg file and restart your Firefox process.

This was heavily borrowed from: https://kb.mozillazine.org/Locking_preferences

Happy Firefoxing!


where randomness meets the internet


~ About me ~
just a human doing random things
~ Follow me ~