Search Bar

From MozillaZine Knowledge Base
Jump to navigationJump to search
This article applies to Firefox.

Firefox's Search Bar is a convenient way to search using your favorite search engines. The default is Google.

Using the Search Bar

To search, click in the Search Bar (or press "Ctrl+K") and start typing. Hit "Enter" and your search will be run. You can use "Alt+Enter" to open search results in a new tab.

The Search Bar supports more than one search engine. To see the list of available engines click the icon at the left of the bar, and a list showing the choices will appear. You can also use "Ctrl+Up"/"Ctrl+Down" to cycle between the available choices.

Installing search plugins

To add new search engines to the Search Bar, click the search icon and then click "Add Engines...". You will be taken to the Search Engines page at Mozilla Update where some of the more popular search plugins can be installed. (A more comprehensive collection of search plugins is available at mycroft.mozdev.org.) Click one of the search engine links to install the new search plugin. If you don't see an "Add Search Engine" dialog box, make sure that JavaScript is enabled.

You can always uninstall search plugins you don't want by removing the associated files.

Note: The default set of search engines are stored as *.src and *.gif or *.png files (for example, "google.src" and "google.gif") in the "seachplugins" subfolder of the Firefox installation directory. In previous versions of Firefox, when you install a new search engine, the associated files are added there. Starting in Firefox 1.5, added search engines are placed in a new "searchplugins" subfolder of the profile folder so you may have searchplugin files in both locations.

Linux users

On Linux, you will need write privileges to the "searchplugins" subdirectory under the installation directory. If you've installed Firefox to a location where you do not have write privileges, you can either manually change permissions on the "searchplugins" folder or briefly run firefox as root to add additional search engines.

To run firefox as root, fire up the console and type su (followed by the root password). Then type firefox.

The preferred method of changing the subdirectory permissions is to change group ownership and add write privleges for that group. For security purposes, making the directory world writable is not recommended. To change the subdirectory, you'll need to create a firefox group and add yourself to the group. First, create the group:

Edit the /etc/group file. (You must have root privliges to edit the file.) Add the following line to the bottom of the file:

firefox:x:###:username

Replace username with your login name. If you have multiple users on the machine and want them to be able to add search engines, list their login names after yours, seperated by commas.

Replace "###" with an actual group number. It must be unique in the file. Usually, you can simply get the number of the last group in the file and increase it by one.

After saving the file, issue the following commands as root. (These assume that firefox is installed in /usr/lib/mozilla-firefox. If your installation is located elsewhere, you'll need to change the path to reflect your installation.)

chgrp firefox /usr/lib/mozilla-firefox/searchplugins

chmod g+w /usr/lib/mozilla-firefox/searchplugins

Clearing search history

You can clear the previous searches from the Search Bar. Just right-click it and select "Clear Search History". You can delete individual elements by selecting them and pressing "Shift+Del".

Viewing filtered results from search engines

Google

There is a way to turn Safesearch off in the Google search plugin without setting preference cookies. Simply go to the Firefox installation directory, open up the "searchplugins" folder, open the "google.src" file in a text editor like Notepad and add <input name="safe" value="off"> between <input name="oe" value="utf-8"> and <interpret browserResultType="result">. Then save the file and restart Firefox.

Yahoo

To turn off filtering for Yahoo, go to the Firefox installation directory and open the "searchplugins" folder. Then open up the "yahoo.src" file in Notepad or a similar text editor. Add <input name="vm" value="i"> after <input name="ei" value="UTF-8">. Save and restart Firefox.

See also

External links