Adding Search Engines to Firefox

Some of you may have noticed the little search box in the upper right side of Firefox. By default this is set to Google and has the little G icon. If you click on the arrow, you’ll notice several other search engines listed and at the very bottom, Add Engines… Clicking on Add Engines will take you to a mozilla page with many choices to add. Unlike other preferences for firefox, search engines are not stored in a file called user.js or prefs.js. The javascript addEngine() function stores them in the program directory for Firefox.

Fedora: /usr/lib/firefox/searchplugins/ Windows: C:Program FilesMozilla Firefoxsearchplugins

In order to add search engines, you’ll need to have write access to this searchplugins directory on your system. In most cases, Windows users will have no difficulty doing this, but Linux users will find that by default, root is the only user with write access to this directory. There are three basic options at this point, each varying by security preference. Most secure would be to have root add any search engines for you. Next you could have yourself added to the root group and have root chmod -R 775 /usr/lib/firefox/searchplugins. Last and least secure, you could have root give everyone write access to that directory using chmod -R 777 /usr/lib/firefox/searchplugins. Since this is not something you’ll need to do often, I recommend having root add all search engines and leave your directory permissions as they are.

Hopefully, this will be something they change in future updates of Firefox because it is never good to have your filesystem writeable by client-side javascript. These leaves the browser open to any malicious code dumping files into this directory. I guess, we’ll see if they decide to adjust this to store the values in the Firefox profile directory.

01/19/2005 | Free Software, Linux, Windows | Comments

Leave a Reply of Your Own