Both Mozilla browsers support address bar shortcuts. They currently only support one substitution, but it works pretty well for most applications.

To create a shortcut, save a bookmark to the site you wish to have a shortcut to, then edit it and put a %s where the query would go and put a name for the shortcut in the shortcut field of its properties. F.ex, a shortcut for the WlugWiki might look like and be invoked with the name wlug. Then you could enter "wiki MozillaNotes" in your address bar to get to this page.

Search plugins

Mozilla supports the use of plugins that integrate new sites into the browser's search box. F.ex, the following file will let you perform a TitleSearch on the WlugWiki
   name="WLUG Wiki"
   description="Wlug Wiki TitleSearch"
<input name="auto_redirect" value="1">
<input name="s" user>

To use it, save it as wlug.src or something like that in Mozilla's searchplugins/ directory and restart the browser.

Mycroft is a huge repository of search plugins for all manner of sites.

Ad blocking

If you're sick of ads add this to your userContent.css file mentioned above:

*[height="60"][width="468"],  *[height="60px"][width="468px"],
*[height="60"][width="234"],  *[height="60px"][width="234px"],
*[height="600"][width="120"], *[height="600px"][width="120px"],
*[height="600"][width="160"], *[height="600px"][width="160px"],
*[height="120"][width="240"], *[height="120px"][width="240px"],
*[height="150"][width="180"], *[height="150px"][width="180px"],
*[height="300"][width="250"], *[height="300px"][width="250px"],
*[height="336"][width="280"], *[height="336px"][width="280px"],
*[height="400"][width="240"], *[height="400px"][width="240px"]
 -moz-opacity: .2 !important;

and restart Mozilla. You'll have to "Exit Mozilla" if you use Windows Quick Launch.

Alternatively, change the line that says -moz-opacity: .2 !important; to display: none !important; to not even bother loading ads.

Hitting the Escape key will stop GIF animations in Firefox. To disable Flash animation, see the Flash and Java Plugin click-to-load section below.

Configuration options

These settings are set in the prefs.js file.

You can go to the URL about:config (can't make this an href in wiki!!) from within Mozilla to see a list of (all?) the preferences settings, and whether the default value is being used or not.

The site explains in detail what some of the more useful settings do.

Font-related settings

Never use a font smaller than 13:
user_pref("font.minimum-size.x-western", 13);
Use anti-aliased TTF?s:
pref("font.FreeType2.enable", true);
pref("font.freetype2.shared-library", "");
pref("font.FreeType2.autohinted", true);
pref("font.FreeType2.unhinted", false);
pref("font.antialias.min", 16);
pref("", "/usr/share/fonts/truetype");
Anti-aliasing with Bitmap scaling:
pref("font.scale.aa_bitmap.enable", true);
//pref("font.scale.aa_bitmap.always", true);
pref("font.scale.aa_bitmap.min", 16);

Note: fonts that Mozilla lists as having a lowercase initial letter are retrieved through X11 and don't support anti-aliasing.

Debian testing and unstable have a package called mozilla-xft which contains the libraries needed to use TrueType fonts with anti-aliasing.

Colour-related settings

I changed the settings of the colours to use in the browser's Preference pages. I prefer light text on a dark background - however, mozilla still uses dark blue for highlighting text, which can be hard to see. I discovered these settings which change these colours
user_pref("ui.textSelectBackground", "#b4b2b4");
user_pref("ui.textSelectForeground", "#000000");

This gives me black text on a light grey background for text that is selected by the mouse or by searching.


To use your default MailClient instead of Mozilla Mail, use

user_pref("network.protocol-handler.external.mailto", true);

Now this doesn't seem to work in Linux, so you might want to go to the Mozex site and get Mozex, an extension that lets you use any program you like for external links, viewing source etc. (And feed it evolution mailto:%A?Subject=%S&Cc=%C&body=%B )


Installing Plugins

If you have problems with plugins, almost all of them can be solved by manually copying the right files from your installation of whatever-player into your plugin directory. Check out for which file does what.

If you are using Mozilla 1.3 (whether beta or otherwise) and g++-3.2 and trying to use the Sun Java plugin, you might have problems. Try using the Blackdown JRE/JDK. A good way to diagnose problems with plugins in Mozilla is to run
mozilla --debug

Generally, plugins need to be compiled with a similar version of g++ as mozilla itself was compiled (since g++ changed "name-mangling" schemes between version 2.9x and version 3.x). If you only install plugins provided by your distribution, then they have probably compiled everything with the same compiler version. This is the same with the EnigMail PGP plugin for MozillaMail - they provide two versions, one for each compiler version.

Macromedia Flash Plugin: after struggling for months with flash plugin crash, bringing Mozilla down with it, whenever a web page had flash on it, I finally solved the problem. The problem was an issue between Flash 6.0 r79 and XFree86. My X Config file (/etc/X11/XF86Config-4) had a color depth that wasn't an even-byte-boundary depth. It was "DefaultColorDepth 15". When I changed the line to read "DefaultColorDepth 16" flash started working-- no more crashing. Hooray!

Disabling plugins

Mozilla-based browsers (including Galeon) don't seem to have any easy way of disabling plugins under Linux. and will only tell you how to disable them under Windows (the "plugin.scan" preference) or tell you to delete the plugin file (under linux). But if you are using a machine that you do not administer, and it has plugins installed into system directories like /usr/lib/mozilla/plugins, then you are pretty much stuck with it.

But - there is a way to get your mozilla to not use the annoying acroread pdf plugin (or any other annoying plugin) - edit your $HOME/.mozilla/pluginreg.dat file. First, completely close down your browser. Open the file in an editor, and remove the lines related to the pdf (or whatever) plugin. For me, I removed the

following lines
0:application/pdf:Portable Document Format:pdf:$

The format seems to consist of lines ending with ":$" - the filename, a blank line, a magic number of some sort, a description of the plugin, the name of the plugin, and then a number saying how many lines follow. Those following lines (indexed from 0) contain all the mime-types that the plugin handles.

Now I can control how my pdf files open, instead of being forced into that horrible acroread browser plugin...

Using user css to hide/disable plugin content

You can enable the Flash and Java plugins but not automatically load flash animations or Java programs by using CSS and XUL. This can also be used for arbitrary types.

Flash and Java plugin click-to-load

Copy the following into your your $HOME/.mozilla/firefox/salt/chrome/userContent.css file:

 /* Prevent flash animations from playing until you click on them. */
 { -moz-binding: url("resource:///res/clickToView.xml#flash"); }

 /* Prevent java applets from playing until you click on them. */
 { -moz-binding: url("resource:///res/clickToView.xml#java"); }

The file location of the userContent.css will be different for other browsers: try $HOME/.galeon/mozilla/galeon/chrome or $HOME/.mozilla/default/salt/chrome/userContent.css.

Next, copy the clickToView.xml file into the "res" subdirectory of the directory where firefox is installed. The command "which firefox" can help determine the directory where firefox is installed, and root may be needed to install the xml file. The xml file comments also give directions for installing clickToView, including hints for Windows OS users.

Any Flash and Java content will be replaced by a button, and if you click the button it will start the animation. Sometimes flash content covers other content and then shrinks to reveal the real page content. To help manage this, the button is translucent (until you put the cursor over the button) to show what is under it. There is also an X button inside that deletes the click-to-view button without playing (this capability was added on 9/21/06).

clickToView.xml really should be in the chrome directory with userContent.css, but this is not yet supported. Eventually, "profile:///chrome" may be available to replace "resource:///res". And "file:///" will not work here. Keeping a copy of clickToView.xml in the chrome directory is a good idea anyway, and you may want to use a symlink to the xml file in chrome from the res directory.

It is possible to load the clickToView.xml from the web instead of installing a local copy, but this can be slow and the xml file may not always be available or may be modified without your knowing. Use a local xml file if you can, but if necessary the file can be loaded from the web by replacing the moz-binding line with this:

 { -moz-binding: url(""); }

There is also a Firefox extension called FlashBlock that provides similar capabilities.

Misc Neat Stuff

Keyboard shortcuts

For people that want to know the keyboard shortcuts: As of version 1.4, this is in mozilla's help: "Help" menu -> "Help Contents" -> "Mozilla Keyboard Shortcuts".

Printing under Linux/Unix

Rather than using the PRINTER or LP EnvironmentVariables to determine where to print, Mozilla inspects MOZ_PRINTER_NAME instead and falls back to a default of lp if it is unset.


If you find that Mozilla is a little too heavy for your system, try out Firefox. The current version (1.0) is very stable and much lighter on memory than Mozilla. It supports Mozilla's useful features, including tabbed browsing, popup suppression and the fact that it is, of course, based on the wonderful Gecko. It also adds a few features, including extension support (to make the default browser more "minimal"), and fully customisable toolbars!

Note that MozillaFirefox is a replacement for the Mozilla browser component only, and doesn't include Mail, Composer, or any of those things. However, a lightweight, XUL based mail client called Thunderbird is a work in progress, but is still in a very early stage.

MozillaFirefox will become the "official" Mozilla web browser (rather than the current, large integrated browser/mailer/chatzilla that is code-named SeaMonkey). The project's internal name was recently changed from Phoenix to Firebird to Firefox (it's explained on the MozillaFirefox page.) However, the first release is expected to be called simply "Mozilla Browser" (until a better name is found :)

There is good support now for Mac OS X. You could also look at Chimera.


Courier-IMAP and the Folder Namespace Saga

The IMAP spec allows IMAP servers to use whatever namespace they like to store the messages and defines an extension (RFC2342 - NAMESPACE extension to IMAP4) that describes how a IMAP client can discover what this is.

Now if you are like me you like to have different folders from your Inbox that you keep mail in, and you prefer that these folders are on the same level as your Inbox not subfolders of your Inbox. Unfortunately due to some weird interactions between Courier-imap and Mozilla this doesn't work by default. However you can get it working with some magic in the mozilla configuration.

  • Go to the account config screen for the account in question.
  • Choose Server Settings > Advanced
  • IMAP Server Directory should be "INBOX." (no quotes) (IMPORTANT)
  • Personal Namespace should be empty (IMPORTANT)
  • Shared Namespace should be "shared." (enter the quotes in to the textbox)
  • Other Users should be empty
  • Allow server to override these namespaces should be unchecked (IMPORTANT)

Click OK and exit out of the config. You must completely close Mozilla (Mail, Browser everything) before these changes will take effect - This caught me out a few times.

You can now create and use folders at the same level as the Inbox with Courier-IMAP

--Actually, it only appears that you are doing this. Arguably the same point, but the way the data is stored on the server doesn't change. So if you fire up mozilla on a different computer without having made the above changes, you will still get the old view of your directories

Checking all IMAP folders for new messages

By default Mozilla will only check the INBOX of an Imap server for new messages, to change this behavior.

  • Completely Close Mozilla
  • Backup your prefs.js
  • Add the following line

user_pref("mail.check_all_imap_folders_for_new", true);

  • Save the file
  • Start Mozilla

Turning off the crud people put on their web pages

  • about:config (see above) gives access to the browser.blink_allowed flag
  • Preferences -> Privary & Security -> Images permits you to rein-in looping gifs


I had a problem where Mozilla (version 1.2.1) would hang when going to the "Helper Applications" preference. I found that if I moved the "XUL.mfasl" file out of the way (in my ~/.mozilla prefs directory) things worked again after the next mozilla startup.

Also, I had a similar problem where one day mozilla mail would work but any attempt to start a browser would result in it sitting in a loop allocating memory. Removing the large XUL.mfasl fixed this (mozilla recreates this file the next time you start).

This might also fix problems if Mozilla/Firefox crashes on startup after upgrading to a newer version.

Using the mouse buttons for page forward/back

Mozilla catches M-Left and M-Right, and also M-ScrollDown and M-ScrollUp, as Page-forward/Page-backward commands. In theory, you can bind any key to do this, via the 'mozilla -remote xfeDoCommand(back)' or some similar magic, but the back and forward commands aren't actually implemented yet.

If you run sawfish, you can get Button 6 and Button 7 on your Intellimouse Explorer Pro Optical Whatever to do page forward/back by hacking at your /.sawfish/custom file. I added a dummy event for Button6-Click and Button7-Click (say, open xterm) via the control panel applent (sawfish-ui), and then opened my custom file and edited the event as shown below. Note that after this I wasn't really able to edit my custom bindings any more, as sawfish-ui didn't know how to deal with synthesize-event.

((synthesize-event "M-Left" (input-focus)) . "Button6-Click") ((synthesize-event "M-Right" (input-focus)) . "Button7-Click")

What this actually does is sends a M-Left or M-Right on Button6/Button7 click. It works.

There might be a nicer way of doing this in other window managers. or it might be possible to get mozilla to grab button6/7 itself, I dont know. --DanielLawson

For a more generic approach, install the IMWheel daemon and create a .imwheelrc in your user directory. To map the side buttons to alt-left and alt-right, put into it:

 None, Up, Alt_L|Left
 None, Down, Alt_L|Right

Finally, run 'imwheel -b 67' to map buttons 6 and 7 only. See Google or the IMWheel site for more examples. --Pradeep Sanders

Another possibility is to remap the mouse buttons using xmodmap. This was actually done under Solaris (Nevada build 30), but I see no reason why it shouldn't also work under Linux (I don't currently have a Linux machine to try it).

I discovered through trial and error (and a little luck) that buttons 6 and 7 were indeed making Mozilla move back and forward through the browsing history (I didn't actually have to do any of the above steps).

Using xev to debug the mouse buttons (I have a Logitech MX700), I found the following:

Button Desc
1      Normal left button
2      Press the wheel
3      Normal right button
4      Wheel up
5      Wheel down
6      Wheel up fast
7      Wheel down fast
8      Back thumb button
9      Forward thumb button
10     The one on the top
11     Don't know

6 and 7 are generated if the mouse wheel is spun very quickly, and they make Mozilla move through the browse history. Also, for some reason, the USB driver seems to detect 11 buttons - maybe it's a bug in the driver (but it doesn't seem to do any harm).

Obviously, I'd like buttons 8 and 9 to make Mozilla move through the browse history, so I swapped them with buttons 6 and 7 using xmodmap:

xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11"

-- Allan Black

Type-ahead Find Problems

I was having problems where somehow typeahead find would become enabled whenever I tried to type into the address bar and it was near on impossible to get out of the typeahead find mode. To disable it set


to false.

This appears to be a bug in Mozilla (or X) - occasionally the focus gets stuck on the wrong object and the main page gets the focus, even if you click on the address bar on in a form field. If you are using tabs, changing to another tab and back clears the problem, but it is still an annoying bug. The point is I don't think it's the typeaheadfind's fault... I haven't seen it in moz 1.4 or later, although I still see at in 1.2.1 -- JohnMcPherson

Thunderbird hangs while accessing IMAP folders from Courier-IMAP server

I had to set MAXPERIP=5 in /etc/courier/imapd (on a Debian 3.0 server). Otherwise Courier-IMAP defaults to allow only 4 connections per IMAP client and that causes Thunderbird (and Netscape Messenger, IIRC) to stop responding. -- FrEd -- This is actually configured within the mail client (Thunderbird, Netscape Messenger, Mozilla Mail, etc). Go to the Account Settings, then Server Settings, press the 'Advanced' button, and there is field for 'Maximum number of server connections to cache', which is set to 5 by default. -- DanielLawson

Slow File Picker

Linux Firefox comes with a GTK2 file picker that is very slow. You may see a large delay when starting a download or using "Save Image As" or "Save Link As". The delay increases if there are many files in the target directory, and KDE users may see more delay than GNOME users. The GTK2 file picker also selects the target file name, so you cannot middle click to paste previously selected text into the name. You can recover the built-in XUL file picker. For Firefox 2 and above, type “about:config” into the URL and find the preference called “ui.allow_platform_file_picker”. Double-click on the preference to change the value to false. For more details, see the MozillaZine KnowledgeBase. (For Firefox 1.5, you need to use different instructions.)

See also