Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

How do I set the default search engine when deploying Firefox?

  • 5 отговора
  • 3 имат този проблем
  • 1 изглед
  • Последен отговор от jlore

more options

I already have a local-settings.js file calling a mozilla.cfg file to set other preferences. I also have an override.ini file. I'm trying to set the default search engine back to Google for my entire environment when deploying Firefox.

I have tried:

user_pref("browser.search.defaultenginename", "Google"); user_pref("browser.search.defaultenginename.US", "Google");

In a user.js and all.js file. The former in the user profile the latter in the install_dir\defaults\pref folder (when I try this in mozilla.cfg Firefox won't open). Neither option works, and my search engine is still Yahoo.

When I run about:config it shows:

browser.search.defaultenginename;Google browser.search.defaultenginename.US;data:text/plain,browser.search.defaultenginename.US=Yahoo

If I manually set my search engine to Google I have:

browser.search.defaultenginename;Google browser.search.defaultenginename.US;Google

I already have a local-settings.js file calling a mozilla.cfg file to set other preferences. I also have an override.ini file. I'm trying to set the default search engine back to Google for my entire environment when deploying Firefox. I have tried: user_pref("browser.search.defaultenginename", "Google"); user_pref("browser.search.defaultenginename.US", "Google"); In a user.js and all.js file. The former in the user profile the latter in the install_dir\defaults\pref folder (when I try this in mozilla.cfg Firefox won't open). Neither option works, and my search engine is still Yahoo. When I run about:config it shows: browser.search.defaultenginename;Google browser.search.defaultenginename.US;data:text/plain,browser.search.defaultenginename.US=Yahoo If I manually set my search engine to Google I have: browser.search.defaultenginename;Google browser.search.defaultenginename.US;Google

Всички отговори (5)

more options

Type about:preferences#search<enter> in the address bar. This is where you should set up the search options.


These add-ons are useful in case of problems.

Bookmark and use this; Mozilla Search Reset {web link} This add-on is very simple: on installation, it backs up and then resets your search preferences and home page to their default values, and then uninstalls itself. This affects the search bar, URL bar searches, and the home page.


Settings Guard for Firefox {web link} Detects and resets changes to settings that are frequently done by add-ons and application installers.

more options

When I change the default search engine and check what files were updated in the profile folder, this one comes to the top: search-metadata.json

It seems that [global] is getting updated with both a name and a hash. That might be an anti-hacking measure; I haven't researched it.

more options

@FredMcD I need to set the search preferences during deployment of Firefox. I can not go around to 300+ machines and set the search engine from about:preferences#search. Everything else can be customized from mozilla.cfg, user.js, or a company .js file.

If it weren't for Chrome dropping support for the NPAPI I would have pulled the plug on Firefox and gone to Chrome, but we are an Office 365 shop and Chrome is no longer going to support it.

more options

since it is a common practise by adware and search hijackers to change the search engine that way, i think setting a default engine through a pref is no longer supported. you might ask in the https://mail.mozilla.org/listinfo/enterprise mailing list if there are other strategies to achieve that while deploying firefox.

more options

@Philipp Thanks, I will try that. I do know I can delete all the .xml files (except Google) from install_dir\browser\searchplugins and that does work. That may be my only option.