Gentoo Wiki




The Mozilla Firefox is a popular open source web browser using the Gecko engine, spring of the Mozilla-Family. It includes tabbed browsing, a spell checker, incremental find, live bookmarking, a download manager, and an integrated search system that uses the user's desired search engine. Mozilla Firefox can be extended with add-ons created by third-party developers.



To install Mozilla Firefox, run: emerge -va mozilla-firefox-bin. In case you are not using the x86 or x86_64 architecture, you will have to compile the whole package (instead of using the binary). This will take about half hour or longer depending on your setup.

emerge -av mozilla-firefox


You can start Mozilla Firefox by entering firefox. Note that if you want to start Mozilla Firefox using X forwarding, use firefox -no-remote instead.


Default browser

In order to use the Mozilla Firefox as your default browser, you need to change the $BROWSER variable. For more information, see TIP_Set_your_default_browser.

Opening X-Chat from Mozilla Firefox

Note: Tested with net-irc/xchat-2.6.8. Previous versions are not guaranteed to work.

You have to emerge xchat with the dbus USE flag. Also make sure dbus is emerged with the X USE flag set.

File: /etc/portage/package.use
net-irc/xchat dbus
sys-apps/dbus X

To install X-Chat, run: emerge -av xchat

Note: It is not required to run the dbus daemon (/etc/init.d/dbus).

Now you have to edit ~/.xinitrc. Replace your existing line in the following way (in this example we are using fluxbox as our WM):

File: ~/.xinitrc
#exec startfluxbox
exec dbus-launch --exit-with-session startfluxbox

Let's configure Firefox:

File: ~/.mozilla/firefox/<xxxxxxxx>.default/user.js

Create the xchat-firefox script:

File: /usr/bin/xchat-firefox
xchat --existing --url=$@

Then make it executable:

chmod +x /usr/bin/xchat-firefox

Everything should be ok now. Just test by clicking on a URL such as the following one:


Opening Mozilla Firefox from X-Chat

To open a URL in Mozilla Firefox from X-Chat, CTRL-click on it, or right-click and choose Open Link in Browser from the context menu. You will need to set Mozilla Firefox as the default URL handler for http: and https: URI schemes.

GNOME users, just use the GNOME control panel. Non-GNOME users, use the gconftool-2 command:

gconftool-2 -t string -s /desktop/gnome/url-handlers/http/command "firefox %s"
gconftool-2 -t string -s /desktop/gnome/url-handlers/https/command "firefox %s"

Search engines

If you are using Mozilla Firefox 2.0 or newer, just open the drop down menu of you search bar on some web sites. For exemple, in this page, there should be an entry Add Gentoo Linux Wiki (English), it lets you download and install plugins automatically.

When you are on some Gentoo pages, you can see that you can add search engines plugins for Firefox. In this page, you can add the one for "Gentoo Linux Wiki". On the main page, you can add "Gentoo list archives". On, you can add "Gentoo Website", "Gentoo Forums" (post & topics), and "Gentoo Bugzilla" (bug no & bug summary). On you'll be able to add a searchengine plugin for this website (search by description, search revdeps). In the next section, you'll see how to add search engine for gentoo-portage.

You can add keywords for them, to quickly search "gw editing search bar" "gpo thing", or "gzo what", "revdep app-shells/bash"...

There are more search engines, you can find those on mycraft:



To install it you can go here and download both files into the "searchplugin" folder in your firefox installation folder:

After restarting Firefox you will get a nice option in your browser to search the wiki directly in the top right of your browser

Problems I

If the search bar does not show up instantly after clicking the link you may fix it by doing this:

su -c "chgrp wheel /usr/lib/mozilla-firefox/searchplugins/ && chmod g+ws /usr/lib/mozilla-firefox/searchplugins/"

All users in the group "wheel" now have enough permissions to add searchplugins

As of Firefox 1.0.6 it is under /usr/lib/mozilla-firefox, so you have to type:

su -c "chgrp wheel /usr/lib/mozilla-firefox/searchplugins/ && chmod g+ws /usr/lib/mozilla-firefox/searchplugins/"
Problems II

If you're using the firefox-bin package you'll have to set the following directory:

su -c "chgrp wheel /opt/firefox/searchplugins && chmod g+ws /opt/firefox/searchplugins"


In the bookmarks menu go to manage bookmarks and add a new bookmark. The name isn't important, but the Location should be
and the put whatever keyword you want to use (lets say 'gw'). Then place the bookmark somewhere (it's not important where. Now you should be able to type in you location bar
gw <some search term>
and search the wiki

Inline mplayer

Version 1.0_pre7-r1 and 3.11 are in the ~x86 branch, the stable branch should work also. I would also recommend only installing one package for audio/video stream, installing more than one could cause problems. To use mplayer with the mozilla firefox browser you have to emerge the mplayerplug-in. emerge -av net-www/mplayerplug-in See here on how to configure mplayer

You may want to change the USE flags for the plugin.

File: /etc/portage/package.use
net-www/mplayerplug-in gtk divx firefox gmedia quicktime wmp realmedia

When you are done editing the package.use file, emerge and proceed. Now we have to copy the downloaded files so Mozilla Firefox detects them as plugins.

cp /usr/lib/nsbrowser/plugins/* ~/.mozilla/plugins/

Minimize to tray

The extension FireTray allows you to minimize the Mozilla Firefox to tray. An alternative to it is AllTray but if you use the Google Sync Plugin for the Mozilla Firefox, there might be some problems with it since a window asking you for your Google password pops up when starting the Mozilla Firefox. If you're using AllTray, only the first Google Sync window is docked into the tray.

Getting the standard Mozilla Firefox logo

Note: As of Firefox, the default Gentoo ebuild uses the useflag 'bindist', not the earlier 'mozbranding'. The 'bindist' useflag must be disabled to enable the "standard" logo.

Earlier Firefox packages enabled the official Mozilla branding by default. After reported legal redistribution problems with Mozilla-owned branding, this was disabled. Earlier Firefox 2.0 ebuilds made use of a "moznobranding" use flag. In recent ebuilds, this behaviour has been reproduced in the "bindist" use flag.

To enable the official branding for Mozilla Firefox you must disable the 'bindist' useflag, either globally in /etc/make.conf or by adding "www-client/mozilla-firefox -bindist" to /etc/package.use. You can also make global use flag changes with the "ufed" utility ("emerge ufed" to install this package). Firefox also respects an 'iceweasel' useflag to enable the Debian replacement branding for Firefox.


Warning to system upgrades after installing plugins!

If you enable the nsplugin in /etc/make.conf, whenever you go to update programs (ie. emerge -uD world) you could have unwanted applications creating plugins. To prevent specific applications to not use the nsplugin use flag, add "-nsplugin" to the application in /etc/portage/package.use. The following example prevents media-video/totem from building a plugin.

echo "media-video/totem -nsplugin" >> /etc/portage/package.use && emerge totem

Adobe Flash

See Adobe Flash article.

Adobe Acrobat Reader

See Adobe Reader article.


See /Java article.

gxine for audio/video stream

Make sure you have nsplugin set in your /etc/make.conf file and do:

emerge -av gxine

Make sure it says +nsplugin not -nsplugin so that it looks like this:

Code: emerge -av gxine
 [ebuild   R   ] media-video/gxine-0.4.9  -lirc +nls '''+nsplugin''' 0 kB

You should now be able to browse to about:plugins in firefox to see your gxine plugin. If not, check your symlinks in your firefox plugin directory. Now make symlinks in /opt/netscape/plugins to the libraries in /usr/lib/gxine and you are ready to go. Note that gxine will by default play videos as 50% size. Just go into gxine's preferences the first time you play a video and change that to be 100%.

cd /usr/lib/nsbrowser/plugins
ln -s /usr/lib/gxine/ .

This plugin is nice enough for playing ASF, but for most things the mplayerplug-in package is a better.


(Firebug) is an excellent plugin for AJAX development. In order to get it working, compile Mozilla Firefox with the USE flag mozdevelop. See Firebug and the Firebug group for further information.

Retrieved from ""

Last modified: Tue, 30 Sep 2008 12:31:00 +0000 Hits: 11,723