Ubuntu Firefox's Tattletale Search Query

Search SimplificationHave you ever noticed that when you type a search term into the search box in the top right of your Firefox browser, that a load of junk gets added to the search term. For example, you search for 'banana' and you get something like this:

http://www.google.com.ph/search?q=banana&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a

Well what you're effectively doing is giving Google a lot of information for free. Which irritates me. All I really need is this,

http://www.google.com.ph/search?q=banana

and if they really want to know more about me, then they're welcome to go digging through their logs.

OK its a minor irritation, but one that we can fix! I understand that Ubuntu does it as part of a deal with Google, but there's no reason why we can't take matters into our own hands and change the defaults.

So, the file you need to find is this one: /usr/lib/firefox-addons/searchplugins/google.xml, and you'll need to open it in an editor as root.  So:

sudo gedit /usr/lib/firefox-addons/searchplugins/google.xml

If you use another search engine as your default, then choose a different file, of course. With this file open in an editor,  remove the offending lines. In the case above, its

  <Param name="ie" value="utf-8"/>
  <Param name="oe" value="utf-8"/>
  <Param name="aq" value="t"/>
  <!-- Dynamic parameters -->
  <Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
  <MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>

Save the file, restart Firefox, and we're good to go.  Now the problem is that whenever you upgrade Firefox, the problem reappears, so you might want to make a copy of the correct file, and write a script to replace it every time you upgrade.  I always manage to forget where the file is, so I'm blogging this for my own benefit as much as anyone elses …

Leave a Comment