How can I change the default search engine via about:config?
Is there a way to change the default search engine in about:config? I tried lockPref("browser.search.defaultenginename", "Search_engine_name_goes_here") and lockPref("browser.search.defaulturl", "https://searchengine.test/q?="), unfortunately without success.
由 wiwouchu 於
所有回覆 (10)
Hi,
In about:config, after you've typed in the search bar browser.search and set the values of the related preferences to what you want :
Did you then close and restart Firefox, in order for the changes to take
effect ?
Rhetorical question/remark :
In Options => Search : you will of course have set your default search engine .....
Ok, i tried browser.search in 2 Browsers Firefox ESR and Firefox RR
I restarted Firefox several times, no effect.
There are about 30 Settings listed. So I changed a few settings like:
browser.search.defaultenginename.US browser.search.order.US.1 browser.search.defaultenginename
Still no effect.
I actually tried this manual :
I followed all the steps and it worked great until I wanted to change the default search engine.
Why can I disable things like webgl and javascript in about:config but can't even change basic settings like the default spy engine? Thanks.
由 wiwouchu 於
A while ago this setting was moved into a separate file, which is now compressed:
- File name = search.json.mozlz4
- File location = profile folder (see: Profiles - Where Firefox stores your bookmarks, passwords and other user data)
- Decompression tool at https://www.jeffersonscher.com/res/searchjson.html
There is an API for extensions to add a new search engine and/or change the default search engine. There might also be a method you can use in an Autoconfig file.
Why do you need this?
由 jscher2000 - Support Volunteer 於
Thanks for the answer, I found the file. I notice we're getting closer to the answer.
But why did they remove this option in the first place?
I have decompressed the file with the website but that doesn't help me either. Which text must I change so that xy is the default search engine? Or simpler: Can this be done without decompressing? I don't want to go to all users and change this file in their Profile folder. Do I have to write a script for it? Or can I tell Firefox not to use this file?
I need this option for a "business". I want to change some default settings like the search engine because I have security concerns. So I would like to lock down some options.
I have read the article from Mozilla "Deploying Firefox in an enterprise environment". It was great but if I can't even change the addressbar default search engine it doesn't make much sense.
由 wiwouchu 於
Hi wiwouchu, for enterprise deployment, I suggest signing up for the Enterprise mailing list and looking into tools such as CCK2, or at least learning about Autoconfig files.
- Mailing list: https://www.mozilla.org/firefox/organizations/
- Autoconfig:
If you want to see Autoconfig in action, you can install the Lavasoft/AdAware Web Companion program. During the past year, it started using an Autoconfig file to replace the default search engine in Firefox with one controlled by that program's control panel. Not surprisingly, some programs now detect it as malware.
Firefox users do not like surprises, so I suggest being open with your employees about why you are making the change. If it is abused too often, I would expect Mozilla to remove this method.
Time for a little summary:
There is probably no way to set the default browser via about:config because Mozilla has removed it, no idea why.
If I understood correctly, the search engine settings are now stored in a compressed file named search.json.mozlz4 in the profile folder.
Another possibility would be to change and recompile the Firefox source code.
I just feel like chris.lewis here: https://support.mozilla.org/en-US/que.../1112636#answer-908013
Of course, users are allowed to choose another search engine, but if Firefox doesn't allow me to force another search engine, I have to filter the domain on the firewall.
I'm not a software developer but I don't think it's a problem to include defaultPref ("browser.search.selectedseachengine", "") or lockPref ("browser.search.selectedsearchengine", "") in the browser.
Yes, thank you, I will have a closer look at the mailing list.
CCK2: I've been to the website before and it looks like the extension is not compatible with the browser (It's only compatible with Firefox ESR and I like depricated software).
I downloaded the software from Lavasoft. Yes very nice, it can change the search engine by some magic, but the search ends up with a search engine I don't want. It would be great if there was a solution without third party programs.
Maybe I should just wait for a few versions...
由 wiwouchu 於
wiwouchu said
I downloaded the software from Lavabit. Yes very nice, it can change the search engine by some magic, but the search ends up with a search engine I don't want. It would be great if there was a solution without third party programs.
I am not recommending the Lavasoft program! Their program demonstrates what you can do with your own Autoconfig file.
What is the content of the config file that Lavasoft uses?
I'm on Linux and can't install this software and I'm curios what steps thy use.
cor-el said
What is the content of the config file that Lavasoft uses? I'm on Linux and can't install this software and I'm curios what steps thy use.
Here's one variant: http://www.commentcamarche.net/forum/affich-35073835-supprimer-bing-de-firefox#9 ("avant" code block)
Thanks Jeff.
I was already assuming that the search service was used as that is the way to do this.