How to set system wide Preferences for Firefox 122 on 22.04

I have looked a few options to set default homepage options for all users. the options below added to /etc/firefox/prefs.js and /usr/lib/firefox/defaults/pref/prefs.js. Nothing seems to work and there isn’t clear documentation that covers the latest deb version pushed out through Firefox’s apt repo (non-snap version). I got the impression some release notes these config files are no longer used, which tallies with the fact they don’t seem to change anything.

user_pref("browser.startup.homepage", "");
user_pref("startup.homepage_override_url", "");
user_pref("startup.homepage_welcome_url", "");

Because of the odd method Firefox generates pref files, I’m having to resort to a fairly hacky methods to push lines of config into a given users config files: ~/.mozilla/firefox/*.default-release/prefs.js. This isn’t ideal as I want to override other options to stop the Firefox welcome page as these are shared machines.

Asked By: jamboNum5


You have the wrong file and the wrong function. You want to open /etc/firefox/syspref.js and append the your lines fixed to become this:

pref("browser.startup.homepage", "", locked);
pref("startup.homepage_override_url", "", locked);
pref("startup.homepage_welcome_url", "", locked);

It’s not named the same as the prefs.js in your Firefox profile. Also, /usr/lib/firefox/browser/defaults/preferences/syspref.js should be a symlink to /etc/firefox/syspref.js , and /usr/lib/firefox/defaults/pref/prefs.js shouldn’t exist .

Answered By: Daniel T
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.