[Corporate Environment] Default Search-Engine via Setting (about:config) in Package
Hi all,
we are using Firefox for more than 5000 users in our corporating. We deliver Firefox via SCCM packages to clients and include a config file for setting a few (fix) settings for all users. We do not use GPO (Group Policies) for Firefox.
Now our issue: we want to have a initial state, so that Ecosia becomes default search engine (changeable). There were a lot of different parameters for about:config (and cfg-File) for setting an initial or fix search engine (such as browser.search.defaultenginename), but all of them are deprecated (due to maleware/adware issues?).
All I find now is the parameter named browser.search.searchEnginesUR, but it only retrieves a central URL with a list of search engines.
So I thought about these possible solutions: - Finding an other parameter to control the default search engine (or Addon, or GPO,...) - or: Creating an own (hosted) search engines list with Ecosia on top level (first entry).
Thank you so much in advance!
Best Regards,
Yannick Wickum
Ọ̀nà àbáyọ tí a yàn
If you customized a particular Firefox, changed the order, set the default, etc., you should be able to put that search.json.mozlz4 file on another version of Firefox and it will use the same settings.
All search related settings are stored in that file.
Ka ìdáhùn ni ìṣètò kíkà 👍 1All Replies (9)
Hi Yannick! The settings for search engines are not stored in the standard Firefox configuration anymore.
In your case, you'd probably find it easiest to use the SearchEngines
policy in the policies.json file to add search engines can change the default one. However, those policies currently only work if you are using the ESR version of Firefox.
OK, well, thanks a lot for your reply. That answers my questions so far with config.
So, we don't use ESR and do not plan to do...
Is there a chance to set it in user context? I could imagine scripts to modify the prefs.js of the individual user. Do you know the parameter / config line for that? Or isn't there any?
Thanks again in advance, Yannick Wickum
In current Firefox releases all search engine data is stored in search.json.mozlz4 in the Firefox profile folder and in the future this can change to indexedDB (local storage), so it isn't easy to accomplish this.
Hmm, the docs look outdated.
You might be able to do this via autoconfig.cfg, see:
Thank you, cor-el!
What do you think about creating a custom file by this add-on? https://addons.mozilla.org/en-US/firefox/addon/mozlz4-edit/
After that we could deploy it to profile dirs of users...(?)
Do you still use Autoconfig (CFG file)? I could give you some code that could help.
Hi Mike, thanks for your reply.
Yes, we use autoconfig-file (in our case: firefox.cfg):
Example: //pref(prefName, value) – sets the user value of a preference. This function explicitly sets the preference as a user preference. That means that if the user has changed the value, it will get reset every time the browser is started. //defaultPref(prefName, value) – sets the default value of a preference. This is the value that a preference has when the user has not set any value or the user resets the preference. It can be permanently changed by the user. //lockPref(prefName, value) – sets the default value of a preference and locks it. This is the most commonly used function. Locking a preference prevents a user from changing it, and in most cases, disables the UI in preferences so it is obvious to the user that the preference has been disabled. //unlockPref(prefName) – unlocks a preference. As an example, this would be used in case where a preference should be locked for all users, but unlocked for particular users. //getPref(prefName) – retrieves the value of a preference. If the preference doesn’t exist, it displays an error. This function should only be used on preferences that always exist. //clearPref(prefName) – removes the user value of a preference, resetting it to its default value. //displayError(funcname, message) – displays an error in a specific format, which is a handy tool for debugging. // Netscape.cfg/AutoConfig failed. Please contact your system administrator. // Error: [funcname] failed: [message] //getenv(name) – used to query environment variables. This can allow access to things like usernames and other system information. try { pref("parameter", "value");
// AND SO ON...
/* */
} catch (e) { Components.utils.reportError(e);
}
I've looked into this and I can't find any clever way to set the search engine this way.
We've done a lot of work to prevent search hijacking, and this was a casualty of that.
My only suggestion would be to customize the settings you want in Firefox and then push the search.json.mozlz4 out to users profiles.
If you pushed the addon, users would get the engine, but it wouldn't be the default.
OK, thanks a lot. Then we would edit it and deploy it with the package to the user's appdata folder. So when I manually edit it search.son.omzl4-File it would be possible to set the order of the search engines? So that we could set Ecosia as first by default? Or would it just have no effect but the list of possible search engines?
Ọ̀nà àbáyọ Tí a Yàn
If you customized a particular Firefox, changed the order, set the default, etc., you should be able to put that search.json.mozlz4 file on another version of Firefox and it will use the same settings.
All search related settings are stored in that file.