Difference between revisions of "Firefox"

From ArchWiki
Jump to navigation Jump to search
m (Add-ons)
m (Add-ons)
Line 113: Line 113:
*[https://addons.mozilla.org/en-US/firefox/addon/722 NoScript]
*[https://addons.mozilla.org/en-US/firefox/addon/722 NoScript]
:Selectively blocks javascript, flash, and other types of content.  Allows active content to run only from trusted sites, and protects the system against XSS and Clickjacking attacks.
:Selectively blocks javascript, flash, and other types of content.  Allows active content to run only from trusted sites, and protects the system against XSS and Clickjacking attacks.
*[https://addons.mozilla.org/en-US/firefox/addon/1557 QuickProxy]
:Adds a button to the browser UI to quickly toggle proxies on and off. Simple, clean, convenient.
*[https://addons.mozilla.org/firefox/59/ User Agent Switcher]
*[https://addons.mozilla.org/firefox/59/ User Agent Switcher]

Revision as of 18:21, 10 June 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Firefox is an open-source graphical web browser from Mozilla. The Firefox package in Arch Linux is compiled without official branding, which means that when Firefox is started it will use an alternate icon and will be named after its release series' codename. This has to be done because a distribution may use the name "Firefox" and its artwork only if there are no unofficial modifications, including security patches.

Enabling Firefox Branding

Changing your user agent string is essential for web sites to recognise your browser as Firefox - and avoid incompatibiility problems (for eg, with Yahoo mail). There are a few ways to enable official branding and to change the browser's user agent string. Among them, there is recompiling, modifying the browser with add-ons, or using the advanced configuration (Template:Codeline). Please note that distributing a version with official branding without previous approval from Mozilla is against the law.


This guide will employ ABS for rebuilding Firefox version 2.x. A branded version of Firefox 3.x is available in the AUR.

After installing ABS,

# pacman -S abs

sync the ABS tree.

# abs

If this is the first time running abs, it may take a while to sync the package tree. Subsequent runs will be much faster. Now make a temporary work path:

$ mkdir -p ~/devel/abs
$ cp -r /var/abs/extra/firefox ~/devel/abs/
$ cd ~/devel/abs/firefox

Use an editor of choice to open the mozconfig file. Add the following line to the end:

ac_add_options --enable-official-branding

Save and exit, then run:

$ makepkg -g >> PKGBUILD

This command copies the md5sum values of modified source files (mozconfig in this case) to the PKGBUILD.

Edit the PKGBUILD file by replacing this line

convert $srcdir/mozilla/browser/app/default.xpm $pkgdir/usr/share/pixmaps/firefox.png

with the following:

convert $srcdir/mozilla/dist/branding/default.xpm $pkgdir/usr/share/pixmaps/firefox.png

Now scroll down and look for these two lines.

install -m644 $srcdir/mozilla/browser/app/default.xpm $pkgdir/usr/lib/firefox/chrome/icons/default/
install -m644 $srcdir/mozilla/browser/app/default.xpm $pkgdir/usr/lib/firefox/icons/

Replace them with the following:

install -m644 $srcdir/mozilla/dist/branding/default.xpm $pkgdir/usr/lib/firefox/chrome/icons/default/
install -m644 $srcdir/mozilla/dist/branding/default.xpm $pkgdir/usr/lib/firefox/icons/ 

Save and exit, then run:

makepkg -s

This will install the required packages for building Firefox prior to making the package itself.

Once it has created the package, remove the currently installed Firefox version, if any:

pacman -Rd firefox

Then install the newly created version with:

pacman -U firefox-*.pkg.tar.gz

Advanced Configuration

Enter Template:Codeline in Firefox's address bar to access the advanced configuration options. In the filter, enter Template:Codeline. This will show the current user-agent string, which can be modified as desired. Leave the version part of the string unaltered, and replace, for eg, "Namoroka/3.6" with "Firefox/3.6" in order to make the browser identify itself with the traditional user-agent string.

Branding without recompilation

To brand "Shiretoko" without recompiling the whole browser, it is required to replace the Bon Echo icons with the official Firefox icons, and change the string "Shiretoko" in a few files. The firebrand script takes care of this (see note in bold in the initial thread post). Run it (as root) after an upgrade or installation of firefox. To revert to the Shiretoko brand again, simply reinstall firefox. The script will by default download the icons every time it is run. To "cache" the icons locally for later firefox upgrades, set the Template:Codeline variable to a suitable directory, for instance:




Modifying the following value can help improve the way fonts looks in Firefox if the system's DPI is below 96. Firefox, by default, uses 96 and only uses the system's DPI if it is a higher value. To force the system's DPI regardless of its value, type about:config into the address bar and search for layout.css.dpi. Change it to 0.

Font Replacement

Another way to improve how fonts look is to replace them with another. Add to, or create a Template:Filename file with the following:

<match target="pattern" name="family" >
    <test name="family" qual="any" >
    <edit mode="assign" name="family" >
        <string>Bitstream Vera Sans</string>

The first font name is the one being replaced, whereas the second is the replacement font.

For more information on font configuration, please read Font Configuration

Default font settings from MS Windows

Below are the default font preferences when Firefox is installed in Microsoft Windows. Many web sites use the Microsoft fonts.

Proportional: Serif Size (pixels): 16
Serif: Times New Roman
Sans-serif: Arial
Monospace: Courier New Size (pixels): 13


Before you try to install add-ons, make sure that your /tmp directory was created with the right permissions. If addons won't install, chmod 1777 /tmp should fix it.

Highly effective ad and popup blocker with lots of options and a simplistic UI.
Allows customizing every aspect of Firefox. Title bar, user agent, icons, about graphic, and more.
Integrate Firefox download complete messages with Linux notifications.
Blocks Flash animations from playing, can be disabled or enabled on a case-by-case basis. Very powerful.
Download all the links, movies and audio clips of a page at the maximum speed with a single click. Very powerful, lightweight and reliable external download manager.
Protect your privacy. Blocks tracking scripts such as Google Analytics.
Allows launching an embedded video from a website in an external application. Good for those who have problems with media plugins.
Selectively blocks javascript, flash, and other types of content. Allows active content to run only from trusted sites, and protects the system against XSS and Clickjacking attacks.
Adds a button to the browser UI to quickly toggle proxies on and off. Simple, clean, convenient.
Adds a menu and a toolbar button to switch the user agent of the browser.


See: Browser Plugins.

To find out what plugins are installed/enabled, enter:


in the Firefox address bar. Or go to Addons from the main bar drop downs and select the Plugins tab.


Recommended readings:

Enable Spell Checking

Right click in any text entry field and add the dictionary for the solicited language. Restart firefox, and click in a text entry field again to enable spell checking.

Wheel Mouse Scroll Speed

To modify the default values (i.e. speed-up) of the wheel mouse scroll speed, type the following into Firefox's address bar:


Now enter the following into the 'filter' dialog: mousewheel.withnokey

  • Double-click the entry entitled, mousewheel.withnokey.sysnumlines and thereby setting its value to false
  • Double-click the entry entitled, mousewheel.withnokey.numlines and enter the desired number of lines per movement into the box (12, for example).

Restart Firefox for this setting to take effect.

Speed-up Firefox Load Time by Compressing the Binary with upx

Install the upx program from [community]

# pacman -S upx

Make a backup of the firefox binary:

# cp /usr/lib/firefox-3.6/firefox /usr/lib/firefox-3.6/firefox_backup

Invoke upx, applying a compression level of 9:

# upx -9 /usr/lib/firefox-3.6/firefox

Speed-Up Firefox by Defragmenting the Profile's SQLite Databases

Warning: This procedure may damage the databases in such a way that sessions are not saved properly.

Firefox 3.0, bookmarks, history, passwords are kept in SQLite databases. SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.

Run sqlite3 Template:Codeline and Template:Codeline commands in the profile directory.


$ cd ~/.mozilla/firefox/9jdn39sdjk.default
$ sqlite3 urlclassifier3.sqlite 'VACUUM;'
$ sqlite3 urlclassifier3.sqlite 'REINDEX;'
$ sqlite3 places.sqlite 'VACUUM;'
$ sqlite3 places.sqlite 'REINDEX;'

Sample Size Differences Comparison

SQLite DB Size Before Size After % change
urlclassifier3.sqlite 37 M 30 M 19 %
places.sqlite 16 M 2.4 M 85 %

To automate the process for all the databases in all the profiles directory, use the following:

for i in `find ~/.mozilla -name \*.sqlite`; do sqlite3 $i vacuum; done
for i in `find ~/.mozilla -name \*.sqlite`; do sqlite3 $i reindex; done

Cache Your Entire Profile into RAM via tmpfs

If the system has memory to spare, Template:Codeline can be used to cache the entire profile directory, which might incur in increased Firefox responsiveness. Full list of possible benifits include:

  • Reduced disk read/writes (ideal when using a SSD)
  • Better user experience through heightened responsive feel
  • Many operations within Firefox become instantaneous (quick search, history, etc.)

See Speed-up Firefox using tmpfs for more information

Speed up rendering by disabling pango

Also, font fix for Mozilla suite



to ~/.bash_profile and relogin for the change to take place. |OR.... just execute it in terminal...?|

Firefox keeps creating ~/Desktop even when I don't want it!

See here

Projects Related to Firefox

Firefox Derivatives

  • Iceweasel - The name of two different Firefox forks. One was a GNU project; the name of this project has since changed to Icecat. The second is being developed by Debian and is based on 2.0. At the time of writing the AUR only has Icecat.
  • GNU/IceCat - formerly known as GNU IceWeasel, is a web browser distributed by the GNU Project. IceCat, which is made entirely of free software, is a fork of Mozilla Firefox. It is compatible with the GNU/Linux operating system and almost all of Firefox's addons. GNU/IceCat really can fully replace Firefox.
  • Swiftfox - An optimized and processor-specific build of Firefox. Currently available via AUR. It should be noted that, considering Arch Linux has ABS, you could build your own optimized build of Firefox.
  • Swiftweasel - Mostly like Swiftfox, but the binaries aren't under proprietary license. Some PKGBUILDs are available in AUR.

Firefox Alternatives

A closed-sourced full-featured web suite.
GNOME's default web browser. Previously used the same rendering engine as firefox, newer versions use webkit.
KDE's default web browser. Uses the KHTML rendering engine.
A very lightweight web browser.
The continuation of the original Mozilla suite. Includes web browser, email client, etc.
A webkit-based GTK+ browser. Lightweight and Stable, with plenty of features already.
A webkit-based Qt browser in development, very capable and fast.
A lightweight webkit browser following the UNIX philosophy; to do one thing and do it well.
A very small, fast webkit browser, from suckless.org

Firefox customized for Speed

Building with Profile-Guided Optimization (PGO) is now available with GCC 4 or newer. A PGO build consists of two passes: a first pass to build instrumented binaries, then a second pass to re-build optimized binaries using profile information gleaned from running the instrumented binaries. The Mozilla build system will run both passes for you, you simply need to provide a script to run the application through some profiling scenarios in between the build passes. TraceMonkey adds native‐code compilation to Mozilla’s JavaScript engine (known as “SpiderMonkey”). It is based on a technique developed at UC Irvine called “trace trees”, and building on code and ideas shared with the Tamarin Tracing project. The net result is a massive speed increase both in the browser chrome and Web‐page content.

XULRunner independent, PGO optimized
XULRunner independent, PGO optimized, 64-bit TraceMonkey, beta


Mozilla Firefox customizable web browser (XULRunner independent, PGO optimized, 64-bit TraceMonkey, Dev tree

This package is similar to firefox-pgo and firefox-pgo-beta. The difference is that it will track mozilla-current, the Firefox trunk, via Mercurial.

Mozilla Firefox customizable web browser (XULRunner independent, PGO optimized, 64-bit TraceMonkey, Dev tree, Multithreaded

See Mozilla Electrolysis project Read instructions given by the .install file to enable SMP, and enjoy! Expect this to be very unstable for quite a while

Firefox with Better KDE Integration

with OpenSUSE patch, integrates better with KDE. OpenSUSE's patch and integration of Firefox with KDE is considered the best by many users.
similar to firefox-kde-opensuse and projects are seeing into merging into one package. If it uses the OpenSUSE patch is unknown but it has other features that make Firefox integrate better with KDE


Middle-click errors

! The URL is not valid and cannot be loaded.

Another symptom is that middle-clicking results in unexpected behavior, like accessing a random webpage.

The reason stems from the use of the middle mouse buttons in UNIX-like operating systems. The middle mouse button is used to paste whatever text has been highlighted/added to the clipboard. Then there is the possibly conflicting feature in Firefox, which defaults to loading the url of the corresponding text when the button is depressed. This can be disabled like so:

Open the browser, and type the following into the address bar:


Search for middlemouse.contentLoadURL and set it to false.

Alternatively, having the traditional scroll cursor on middle-click (default behaviour on Windows browsers) can be achieved by searching for general.autoScroll and setting it to true.

Backspace does not work as the 'Back' button

As per this article, the feature has been removed in order to fix a bug. Follow the next steps to retain the original behaviour.

Open the browser and type the following address:


Search for browser.backspace_action and set it to 0 (zero).

Firefox does not remember login information

It maybe cause of a corrupted Template:Codeline file in Firefox's profile folder. In order to fix this, just rename or remove the cookie.sqlite while Firefox is not running.

Open a terminal of choice and type the following:

$ cd ~/.mozilla/firefox/xxxxxxxx.default/
$ rm -f cookies.sqlite
Note: xxxxxxxx represents a random string of 8 characters.

Restart Firefox and see if it solved the problem.

Broken websites / input fields with dark Gtk Themes

When using a dark GTK theme, one might encounter Internet pages with unreadable input and text fields (p.e. Amazon - white text on white background). This can happen because the site only sets either background or text color, and Firefox takes the other one from the theme.

A work around is to explicitly setting standard colours for all web pages in Template:Filename.

The following sets input fields to standard black text / white background; both can be overridden by the displayed site, so that colors are seen as intended:

input {
    background-color: white;
    color: black;

textarea {
    background-color: white;
    color: black;

This will force the colours ("Allow paged to choose their own colors [..]" setting, in the Preferences > Content > Color dialog):

input {
    background-color: pink !important;
    color: green !important;

textarea {
    background-color: pink !important;
    color: green !important;

Change color values to suit, or use an add-on like Stylish.

Preferences window appears blank

This seems to be caused by files used by an older version of Firefox. Removing the ~/.mozilla/firefox/[profile]/chrome directory fixes it. See the Mozilla Support page.

File association problems

For non-GNOME users, Firefox may not associate file types (in the "Open With" part of the download dialog). Installing Template:Package Official ammends the problem:

pacman -S libgnome

"Pop-in" Facebook chat won't work

Facebook only enables the pop-in chat feature for specific browsers, your browser is most likely not one of those. You can change your user agent string to mimic a specific browser version. A user agent string is the piece of information your browser sends to the webserver to let it know what kind of browser you are using to visit the website. This helps the server provider the content from the site in a format supported by your browser.

If you are using Firefox, read below.

The current Firefox provided from pacman (pacman -S firefox) is Namoroka 3.6.3 (however version number/codename is subject to change).

Facebook has to know that you are using Firefox, and not a unsupported browser.

To edit the Firefox user agent string:

Open up a new tab in firefox, and visit the page below


Once the page is loaded there is a Filter bar where you need to type


when the result has returned it will most likely read "Namoroka/3.6.3" under value.

If your value is something else, that's alright too. Just double click the value, and change the word BEFORE the slash to "Firefox" and leave the version number the same.

To test your new user agent string go to "about:" in a new tab and your new agent string will be listed at the bottom.


An account of the trademark issues from the Firefox package maintainer for Debian.
Official website for the GNU Mozilla forks.