Change the search engine used by about:home in Firefox

6

1

Firefox's default home or start page provides a search engine with some snippets below it. Is there any way to customize the search engine used through about:config or some other configuration file?

localStorage["search-engine"] sometimes gets reset, possibly after an update. I would like to avoid creating a Greasemonkey script that scripts on about:home. If an extension exist to fulfil the task, I'd be happy too.

I'm using Firefox from Kubuntu 11.04 if that matters.

Lekensteyn

Posted 2011-07-02T10:52:43.780

Reputation: 5 236

Answers

5

You may want to use Firefox with Bing

Bing will be set as your homepage and search engine.

Chethan S.

Posted 2011-07-02T10:52:43.780

Reputation: 1 007

2

You can modify the chromeappsstore.sqlite database file inside your profile folder to change the search engine used for about:home. It's not a text-based configuration file, but it's pretty easy to modify with the right set of tools.

You have to modify the emoh.:moz-safe-about scope in the webappsstore2 table. The key is search-engine and the value determines the search engine for that page.

The value has a name and a url. The name can be anything and the URL will replace searchTerms with whatever you type into the search box.

I used the SQLite Manager Addon to play with this setting, but there are other tools available.

Isn't it better to just change the home page?

user81568

Posted 2011-07-02T10:52:43.780

Reputation:

That's the same thing as localStorage: sqlite3 webappstore.sqlite, query select * from webappsstore2 where scope='emoh.:moz-safe-about' and key='search-engine';. Changing the home page is a possibility, but I prefer this one. – Lekensteyn – 2011-07-05T12:40:38.920

2

I just went through this trying to undo the yahoo search engine that the pdfforge toolbar installs.

Easiest way is probably to install Firebug (useful for so many things), and do the following:

  • go to about:home
  • open the Firebug Console tab
  • type in (all on one line, shown here for clarity):

    localStorage['search-engine']=JSON.stringify({
      name:"Google",
      searchUrl:
         "http://www.google.com/search?ie=UTF-8&oe=utf-8&q=_searchTerms_"})
    

where the name property is the search engine name, and searchUrl is the appropriate URL, with the magic token _searchTerms_ being replaced by the keywords you type into the Firefox search box.

Then reload about:home and try again.

I got to this answer by looking at the source HTML code for the about:home page, which loads chrome://browser/content/aboutHome.js that contains code to access localStorage['search-engine'] and use it to update the window.location.href based on the searchUrl and what you type into the search box.

Jason S

Posted 2011-07-02T10:52:43.780

Reputation: 5 983

This does not prevent Firefox upgrades from fiddling with this setting. – Lekensteyn – 2012-01-20T17:10:16.223

2

Seems like there might be a solution on the Mozilla Support page. Click Tools>Web Developer>Scratchpad, enter
javascript:{localStorage["search-engine"]="{\"name\":\"[SEARCH ENGINE NAME HERE]\",\"searchUrl\":\"[SEARCH URL (with _searchTerms_ placeholder)]\"}";void(0);}
and click Execute>Run. Also, on the about:config page change browser.search.defaultenginename.

Der Hochstapler

Posted 2011-07-02T10:52:43.780

Reputation: 77 228

@kino, does your Firefox indeed show Tools, For website authors, Sandbox? Mine (on a Mac) uses names like described in that forum post: Tools, Web Developer, Scratchpad. – Arjan – 2013-05-25T13:44:25.457

@Arjan Translation differences. Thanks, fixed. – kinokijuf – 2013-05-25T19:08:13.477

1

Go to Tools -> Options, and under 'Home Page' put http://www.bing.com/ or whatever other search engine you might want to use.

cutrightjm

Posted 2011-07-02T10:52:43.780

Reputation: 3 966