Firefox 4's default home page provides a search engine with some snippets below. 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 a FF update. I would like to avoid creating a greasemonkey script that scripts on about:home. If an extension exist to fulfill the task, I'd be happy too.

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

link|improve this question

62% accept rate
feedback

2 Answers

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?

link|improve this answer
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 Jul 5 '11 at 12:40
feedback

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.

link|improve this answer
This does not prevent Firefox upgrades from fiddling with this setting. – Lekensteyn Jan 20 at 17:10
feedback

Your Answer

 
or
required, but never shown

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