Friday, February 11, 2005

Firefox: Adding Search Engines to the Search Bar

One of the great things about Mozilla Firefox is the search box that appears along side the address box. By default, you can search Google, Yahoo,, Creative Commons, and Amazon. Below those is an option to "Add Search Engines". Click that, and you get to a page which lets you add more engines.

Except that it doesn't work for a standard installation, since the default directory for the search plugins is $firefoxhome/searchplugins, where $firefoxhome is the directory holding the Firefox installation. Usually that's owned by root, and you don't want to allow an ordinary user to write to root. Apparently a future version of Firefox will allow you to put the search plugins into your ~/.mozilla directory, but not yet. The bug report above has a patch that implements this feature, but you'll have to recompile the source code to make it work. In the meantime, to add search engines to the bar, go nicely ask your system administrator to do it. If you're the SA this may be a problem, but you'll just have to trust yourself. If you have sudo privileges you can also run Firefox with the

$ sudo firefox

command, add the search engines you want, and quite Firefox. Needless to say, you don't want to run Firefox as root or via sudo for more than the minute it takes to add the search engines.


Neil McIntyre said...

I'd been wondering how to do this for a while now! I tried it out and was able to add search engines successfully, but when I closed it down and restarted Firefox not as root I found my bookmarks were gone! Oh well...

rcjhawk said...

The key is to get the files in the appropriate firefox directory. In Fedora's RPM version, that's /usr/lib/firefox-1.0/searchplugins/

Once the files are there, they shouldn't go away. You might check to see that root and your user account are using the same version of firefox.