Sunday 15 March 2009

Mozilla Firefox, Google search plugin (in the address bar) => remove local redirection (i.e. remove search redirection based on your IP)

A short note to myself: This post is, first of all, for me, to preserve my brain sanity (joking!) and increase my efficiency when I deal with this situation again. This has been the 4th time when I had to perform a search to solve it, therefore it's time I write it down for future reference.


Situation

The Google search plugin (in the search bar) in Firefox behaves different to what I expect:
  • The search string is redirected to the local country code Google engine, i.e. .ro, but I prefer the international .com search => I must remove the redirection aka no country redirection

  • The search result only offers 10 results per page, but I prefer 100.
I noticed that this happens in any one of the following situations:
  • Firefox is reinstalled

  • Firefox self updates, e.g. the update to 3.0.7 erased the old google.xml and I had to modify it again.
Therefore, I need a solution.


Solution

First, go to C:\Program Files\Mozilla Firefox\searchplugins

Second, open the google.xml file
This is where all the search bar settings are kept. Once you enter some text in that bar and hit enter, the search is performed based on the settings in that .xml

Perform the following modifications to the file:
  • Add the following lines:
    <Param name="hl" value="en"/>
    <Param name="num" value="100"/>

    between the tags <Url> and </Url> (you will see similar lines there, but with other parameters)

  • Delete all the lines of dynamic parameters: start with <!-- Dynamic parameters --> and stop before deleting </Url>

  • Optional: between the tags ShortName, feel free to replace Google with Liviu's Google Search, since I think it's fun.

  • Save the google.xml file, then restart Firefox. Select the Google search from the address bar (which contains many search options). Insert some string, perform the search. The address bar shall behave as Liviu, i.e. I, likes it to behave.
Enjoy!


Another solution

One can download the search plugin from the Mycroft Project page: click on the Google (No country redirect)


Some useful links:

The search parameters, as explained by Google - who knows, maybe you want to add some more parameters?...
The article that inspired me the first time when I solved this problem.

No comments: