Search:  
Gentoo Wiki

Mozilla_Firefox/Settings

Contents

Introduction

There are a number of settings you can change in the 'about:config' dialog that might be useful to some users. These settings, gleaned from a recent article in Linux Journal, allow you to change various options as described below.

about:config

The first step is to start up firefox and type the string 'about:config' in the address bar. A property-attribute dialog should come up, which reads settings from ~/.mozilla/firefox/*/prefs.js. Unfortunately, this will only show values that have already been set in some way (the full listing of options is not to be found on the disk, sadly) but there were some covered in the article which have some neat effects.

Fixing Horizontal Scroll / Forward and Back Operation

The problem is that by default firefox maps the horiz scroll to the forward and back, this really sucks when using synaptic driver with a laptops touchpad). Luckily there is an easy fix for this.

File: about:config
mousewheel.horizscroll.withnokey.action = 0
mousewheel.horizscroll.withnokey.numlines = 1

The action tells Firefox to scroll the window, not move forward and back in your histors. The numlines option does two things. First it fixes the direction of the scroll, and second it does a small percentage of the window, not a page at a time

Caching

Maximum memory setting

File: about:config
browser.cache.memory.capacity = integer in KB   /* default is to expand as nec. */

Change overall caching behavior

File: about:config
/*
0 = Once per session
1 = Every time I view the page
2 = Never
3 = When the page is out of date (default)
*/
browser.cache.check_doc_frequency = 0|1|2|3

Disabling default script behavior

Note: This really is useful if you need a script to run for a long time for debugging, etc.

File: about:config
dom.max_script_run_time = integer in seconds (default 5, -1: infinite)

Disabling site icons (favicon.ico and 'link rel')

File: about:config
browser.chrome.site_icons = boolean /* (default true, fetches icon) */
browser.chrome.favicons = boolean   /* same ------^  */

Gecko behavior

There are some gecko settings you can change as appropriate for the speed of your machine:

Initial delay

File: about:config
/* default is 250, quarter-second delay before web content begins to draw

   if you have a fast internet connection, set this to a lower value,
   however if you have a slower connection, this can make things worse as it
   will attempt to draw before the page is finished loading, and it will have
   to redraw several times 
 */

nglayout.initialpaint.delay = integer in milliseconds

Rendering interval

File: about:config
/* set to 5,000 for testing...chunking process that saves cpu. dont set too low or you= :( */
content.notify.interval = integer in MICROseconds

Pipelining

Pipelining is a HTTP/1.1 feature that allows a client to send multiple HTTP requests before waiting for the server to answer. This may result in reduced latency but may also cause a page not to load at all on crappy servers.

Activating pipelining

File: about:config
network.http.pipelining = boolean    /* true to activate pipelining */

Please note: If you have problems with Online-Banking and other high-secure sites, test them with this switch set to 'FALSE'.

Open mailto: urls in Mozilla Thunderbird

By default, Mozilla Firefox will not automatically open mailto's in Mozilla Thunderbird. To automatically open Mozilla Thunderbird when we click on a mail link, we have to set in Firefox the mailto protocol handler.

Note: Remember to exit all Firefox instances before making these changes since the prefs.js file is overwritten on program quit.

You should create your own prefs.js file if it does not exist yet:

File: ~/.mozilla/firefox/<random_string>/prefs.js

If you are using the binary version of Thunderbird, add the following line:

user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird-bin");

Otherwise, add this line:

user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird");

Alternatively, we can set Firefox to do the same thing within the browser. This is done through about:config. This way you don't have to close your browser, and the changes take effect immediately. In the address bar, enter in about:config and push enter. A big list of entries will show up, along with a filter bar at the top. Using the filter bar, first make sure the preference isn't already set by entering in "network.protocol-handler.app.mailto". If it exists, you can just double click and change it to "/usr/bin/thunderbird"; if not, right click, go to new, and create a new string. Name it "network.protocol-handler.app.mailto" and input the full path to your Thunderbird binary.

Troubleshooting

If you cannot get the above method to work, you should:

Maximum number of requests for pipelining

File: about:config
network.http.pipelining.maxrequests = integer    /* default is set to 4, try 8 (the maximum value) */

Registering additional protocols

Hate it when you click on links and get "not a registered protocol" error messages?

mailto is not a registered protocol

You can have firefox use external programs to handle them or have firefox display the file as raw text.

Each protocol you want to register consists of two settings:

network.protocol-handler.external.protocol = boolean
network.protocol-handler.app.protocol = /path/to/program

The first setting tells firefox whether to use an external program (true) or have firefox display it (false). The second setting tells firefox what program to run if you told it to use an external program. Please note that you can not use -'s in the path to program. See Bug #321306. protocol is the protocol you want to register, for example mailto, irc or aim:

File: about:config
network.protocol-handler.external.mailto = yes /* mailto:// links from firefox */
network.protocol-handler.external.irc = yes    /* irc:// links from firefox */
network.protocol-handler.external.aim = yes    /* aim:// links from firefox */

network.protocol-handler.app.mailto = /usr/bin/thunderbird /* use thunderbird */ 
network.protocol-handler.app.irc = /usr/bin/xchat-2  /* use xchat */ 
network.protocol-handler.app.aim = /usr/bin/gaim-remote uri  /* use gaim */

To integrate Firefox and xchat, read Mozilla Firefox.

In-Browser Error Pages

Hate it when you mis-type a URL and that annoying error box pops up? You can have those errors display right in the browser window with this:

File: about:config
browser.xul.error_pages.enabled = true
Note: firefox >= 1.5 has it enabled by default

Disable window resize

Get annoyed by sites which resize/move your Mozilla Firefox? here is workaround:

File: about:config
dom.disable_window_move_resize = true

Disable popups from plugins

Annoyed by popups from plugins (for e.g. Adobe Flash)? Here is a workaround:

File: about:config
privacy.popups.disable_from_plugins = 2

Incorrect Rendering DPI

Firefox will sometimes incorrectly detect the DPI of your system to render CSS fonts correctly. In compiled versions of Firefox, this will show as extremely small page text and correctly sized menu text. In binary verisons, this will appear as large menu text and normally sized page text. This can be corrected by changing layout.css.dpi from "-1" to "0".

Other Tips

Other useful tips can be found at www.mozilla.org.

Browse Without Ads

GNOME: Getting rid of web ads

There is an extension that can be installed that gives a more user-friendly way use the above tweaks. You won't have to remember the wording of the settings either. Fasterfox. Note though, that in previous versions of the extension the "Enhanced Prefetching" feature was enabled by default, this feature is looked down upon by many webmasters and may get your browser blocked from certain sites. A better idea might be to install AdblockPlus, webmasters will hate your for this, but, do you really care what they think? Didn't think so. :)

Switching Locales

There are 2 new ebuilds enabling an multi-language install of mozilla-firefox and switching between the locales on the Gentoo Forums

Saving Sessions

I got stuck with Opera for about a week because I broke firefox and the one feature I REALLY like was how if I closed it and opened it again all my tabs would still be there. Well, you can do this in firefox with an extension called SessionSaver. It's really nice, try it!

Note:With Firefox (Bon Echo) 2.0+ you can save your session tabs from Edit-->Preferences-->In main tab the first section (Startup) make it "Show my windows and tabs from last time"

Branding (Gentoo-specific)

If you have the USE flag 'bindist' set for installing "www-client/mozilla-firefox" and "www-client/mozilla-firefox-bin" then you are implying that you plan to redistribute Mozilla Firefox. If this is the case then due to Trademark Licensing issues Firefox has to be renamed. See: http://lwn.net/Articles/118268/

In Gentoo if the bindist flag is set then it will rename Firefox with its release name, e.g. version 2 is "Bon Echo" and version 3 is "Minefield". If the USE flag is set to '-bindist' or not set at all for Firefox then the branding will remain the same as Mozilla's.

Note: An easy way if you want to keep the branding and don't plan to redistribute is to append the following line(s) to your '/etc/portage/package.use': www-client/mozilla-firefox -bindist www-client/mozilla-firefox-bin -bindist

Credits

A big thanks to Nigel MacFarlane and Linux Journal for a great article and of course a great magazine!

Retrieved from "http://www.gentoo-wiki.info/Mozilla_Firefox/Settings"

Last modified: Tue, 09 Sep 2008 22:38:00 +0000 Hits: 81,024