0

There are (at least) two config files that seem to be made to define organizational preferences that should be valid for all users of firefox on a machine: syspref.js and local-settings.js. Additionally, this guide talks about using ´all-companyname.js´.

It tried to define locked preferences by using ´lockPref´ in ´syspref.js´ as described here and here. However, then firefox complains about an unknown keyword. However, I can define the ´general.config.filename´ in both ´syspref.js´ or ´local-settings.js´.

And in addition, one can also define group policies, e.g. using the ´policies.json´.

So, my question is: Which of these possibilities should I use for which purpuse? Is there a good and up-to-date documentation that explains this?

Thanks!

2
  • All instructions are provided here support.mozilla.org/en-US/products/firefox-enterprise/…
    – Biswapriyo
    Oct 19 '19 at 18:14
  • Thanks you for your hint. I previously had a look at this site and found information about policies.json there. However, I didn't find an answer to my question about the different config files and when to use which.
    – Peter T.
    Oct 19 '19 at 18:38
1

I believe that in the latest Firefox versions, you should now use pref("...","...",locked); instead of lockPref("...","...");.

Example :

pref("browser.startup.homepage", "http://...", locked);

see https://github.com/pyllyukko/user.js/issues/415#issuecomment-419739194

firefox-esr (60.0esr-1) unstable; urgency=medium

  • The use of lockPref in preferences under /etc/firefox-esr is deprecated. Please use pref("name", value, locked) instead. lockPref will still be supported for compatibility purpose until version 67.

    -- Mike Hommey Thu, 10 May 2018 09:36:46 +0900

10
  • Interesting ... Can you point be at documentation about this?
    – Peter T.
    Oct 21 '19 at 8:30
  • 1
    See this link.
    – harrymc
    Oct 21 '19 at 9:01
  • Thx! Did they also mention somewhere why they did change the API .......?
    – Peter T.
    Oct 22 '19 at 19:41
  • Apparently it's just streamlining of the interface.
    – harrymc
    Oct 23 '19 at 5:16
  • 1
    The documentation doesn't yet exist. As you can see, the information is still only found in answers to posts in a very partial manner. It's too early yet.
    – harrymc
    Oct 24 '19 at 14:56
0

Reading https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Enterprise_deployment_before_60 I got the impression that all files in the "prefs" directory are read. It says:

Create a JavaScript file that instructs to use a administrative config file at startup. For best results, the filename should be early in the alphabet, for example; 00_admin-prefs.js By convention this file is named autoconfig.js, but other filenames will work.

So, this suggests, that the file is often named autoconfig.js.

On Linux Mint, there is a sym link from /usr/lib/firefox/browser/defaults/preferences/syspref.js to /etc/firefox/syspref.js. So I assume that for this distro that's the place to go.

The doc above states that pref dir can be found:

Linux: browser/defaults/preferences Windows: defaults\pref Mac: Firefox.app/Contents/Resources/defaults/pref

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.