Tuesday, July 7, 2009

OpenDNS, Firefox and the Google Toolbar

I use OpenDNS for DNS lookup, because it seems to be faster than whatever AT&T is providing for my DSL connection. One of the ways OpenDNS gets paid for the service is by redirecting browser address bar searches to their own search engine (which I believe is actually Yahoo). This is annoying, so I tried changing it back to Google (using the about:config keyword in the address bar). But every time I overrode it (in Firefox) I'd find it changed back to "about:neterror?e=query&u=", which leads to OpenDNS.

Turns out the problem was some code run by Google Toolbar when Firefox starts up. GT tells Firefox to run toolbar.js (in the profiles subdirectory extensions/{3112ca9c-de6d-4884-a869-9855de68056c}/lib/), which checks the preferences value of keyword.URL and changes it if it was modified. This is surprisingly unfriendly behavior for Google, not to mention counterproductive because of how it interacts with OpenDNS.

The solution I found was to create a mozilla.cfg file in the Firefox application directory:
//
lockPref("keyword.URL", "http://www.google.com/search?q=");

Then I also modified the file all.js in the greprefs subdirectory (not safe, I know). First I changed
pref("general.config.obscure_value", 0); // for MCD .cfg files
replacing the "13" that was there before (because I can't see the point to this ROT13 mumbo-jumbo), and adding
pref("general.config.filename", "mozilla.cfg");
so that the locked preference gets loaded.

Finally, I get google search from the address bar.

No comments:

Post a Comment