Mozilla Tips & Tricks I
Summary:
- Setting Mozilla Preferences Manually
- Mozilla Skins
- Mouse Gestures
- Keyboard in Mozilla
- Remote Controlling Mozilla
Compatibility notice: Everything introduced here works on Mozilla 1.0 and Netscape 7.
Unsupported Mozilla 1.0 RPMs for Mandrake Linux 8.2 are available from the downloads page? or from the 'unsupported' directory of your favorite Mandrake Linux FTP mirror.
Setting Mozilla Preferences Manually
Mozilla just has too many options to put them all into the graphical 'Preferences' user interface.
In order to do set options manually, create a file called 'user.js' in your Mozilla profile directory. That directory is usually an oddly named sub directory in '~/.mozilla/default' if there are no profiles installed. It's the same directory which has 'prefs.js' in it.
In order to let changes to 'user.js' take effect, you will have to close and restart Mozilla. Notice that changes to 'user.js' are written to 'pref.js' on that occasion. So, if you want to get rid of them again, either create a backup of 'pref.js' before creating any entries in 'user.js' or revert the changes both in 'user.js' and 'pref.js'.
Here's a selection of settings, more can be found on Pratik Solanki's Prefs site and on Customizing Mozilla on Mozilla.org.
Change Download Manager
The new download manager isn't everybody's darling. You can alternatively use the old download dialog boxes or turn off download popup windows completely and check the download status via 'Tools' - '~DownloadManager'.
user_pref("browser.downloadmanager.behavior", 0);
enables the new download manager (standard setting).
user_pref("browser.downloadmanager.behavior", 1);
enables the old separate download boxes.
user_pref("browser.downloadmanager.behavior", 2);
turns off download popups completely.
Turn off Print Progress dialog
user_pref("print.show_print_progress", false);
user_pref("clipboard.autocopy", false);
user_pref("middlemouse.paste", false); user_pref("middlemouse.contentLoadURL", false); user_pref("middlemouse.scrollbarPosition", false);
Disable popup windows for specific domains only
user_pref("capability.policy.popupsites.sites", "http:// www.annoyingsite1.com http://www.popupsite2.com"); user_pref("capability.policy.popupsites.Window.open", "noAccess");
Disable ~JavaScript popup windows
Mozilla users can configure this via 'Edit' - 'Preferences' - 'Advanced' - 'Scripts & Windows' (uncheck 'Open unrequested windows'). This configuration module however is missing from AOL's 'Netscape' and thus requires manual configuration:
user_pref("dom.disable_open_during_load", true);
Another interesting setting for Netscape users in this respect might be
user_pref("imageblocker.enable", true);
which enables the image blocker (default on Mozilla).
Disable blinking text
user_pref("browser.blink_allowed", false);
Font banning
Might be helpful if ~AbiWord is installed (Arial font bug):
user_pref("font.x11.rejectfontpattern", "fname=.*arial.*");
Workaround for the history window bug
Mozilla 1.0 has a rather strange bug: clicking in the history window will make the browser call the address 'www.apps5.oingo.com'. You can prevent this by turning off domain guessing (i.e. adding 'www' and 'com' to a word entered in the location bar).
user_pref("browser.fixup.alternate.enabled", false);
Turn off titlebar animation
Some people's obtrusiveness knows no bounds. This pref turns off animated titlebars:
user_pref("capability.principal.default.Windows.title.set", "noAccess");
Mozilla Skins
Via 'View' - 'Apply Themes' - 'New Themes' you can download and install new Mozilla skins either from themes.mozdev.org or from ~DeskMod.
Notice that you should visit both sites, since some skins are unique, like my current favorite, ~LittleMozilla, which turns Mozilla into an absolutely low key no-nonsense browser. Great on small displays or if you prefer apps which just stay out of the way.
Installation usually only requires clicking a link, restarting Mozilla, choosing the new theme and restarting Mozilla again. It's supposed to work after the first restart if you check 'Use this theme' upon theme installation, but that doesn't work here.
The skins are written in XUL, Mozilla's XML-based User interface Language, which means you can adept themes to your preferences. For this, create a file called 'userChrome.css' in the 'chrome' directory of '~/.mozilla/default/xx.slt'.
These lines for example remove the text under toolbar buttons (e.g. in the 'Classic' skin):
.toolbarbutton-menubutton-button > .toolbarbutton-text, .toolbarbutton-1 > .toolbarbutton-text { display: none 1.1 important; }
Getting rid of the throbber (the animated picture on the right side of the location filed):
#throbber-box { display: none 1.1 important; }
Set font size and type for dialog windows:
window { font-size: 3.5mm 1.1 important; font-family: helvetica 1.1 important; }
Set font size, type and background color for single line text fields:
input { font-family: clean 1.1 important; font-size: 13px 1.1 important; background-color: rgb(200, 255, 220) 1.1 important; }
This also works for multiline input fields. Replace
input
textarea
Check out chapter 9 of the XUL Tutorial at XUL Planet for details and have a look at Chameleon, a graphical theme builder tool for Mozilla.
Mouse Gestures
Mouse gestures allow you to invoke browser actions (going to previous page, close window, open new window etc) with predefined mouse movements. The Opera web browser is renowned for having this introduced into the browser world first.
The Optimoz project brings mouse gestures to Mozilla and even goes beyond the implementation in Opera in that you can configure your own gestures, define which mouse button to use for gestures and more.
In order to install the Optimoz add-on,
- close every open instance of Mozilla and start a new one as 'root' (e.g. from a terminal window);
- point Mozilla to the Optimoz installation page and click on the 'installation' link. Click through the dialog windows;
- quit the browser. In a terminal run this command as 'root':
This command makes the Optimoz configuration module available to non-root users (see Bug 650 for details);
- start Mozilla and open 'Edit' - 'Preferences' - 'Advanced' - 'Mouse Gestures' (optional, default settings work fine).
All of these buttons already call a function when pressed (left marks text, middle pastes, right opens context menu), if you want to perform one of these functions and not a gesture, stop the mouse movement before releasing the mouse button. This tells Optimoz to not interpret this movement as a gesture.
Another possibility would be configuring a mandatory modifier key which has to pressed to activate Optimoz.
Using the right mouse button for gestures as in Opera seems to be next to impossible because Mozilla's context menu has no delay as in Opera.
The Optimoz website also offers a sidebar panel for Mozilla which helps you memorize what gesture performs which action.
The current version of Optimoz requires Mozilla 0.9.9 or later. That is, it won't work with Netscape 6.2 (which is based upon 0.9.4), Netscape 7 PR1 or later is required.
Keyboard in Mozilla
A complete list of Mozilla keyboard shortcuts is available on Mozilla.org.
By default, Mozilla uses the key as the 'primary accelerator modifier' and to access the menus. In Mozilla, '17' stands for , 18 for , 224 for
(e.g. 'Windows keys' if so configured) and '0' for 'off'. You can use these numbers to change the modifier keys, e.g.user_pref("ui.key.accelKey", 18);<br> user_pref("ui.key.menuAccessKey", 17);
switches to be the 'primary modifier' and menus are now accessed via .
You can also set up other custom keybindings but the process looks rather involved.
There's a special feature related to keys in Mozilla which I want to arouse your attention to, 'caret browsing'.
Pressing activates a text cursor which allows you to mark text via the keyboard using and the arrow keys, navigate the page and to call URLs using .
Remote Controlling Mozilla
Like its Netscape 4.x predecessor, Mozilla can be controlled via the command line:
mozilla -remote "openurl(URL)"
for example opens a new tab in an already running Mozilla with the destination address URL. If no instance of Mozilla is running, one is started with this address. If you rather want the URL to open in a new window and not in a tab, use
mozilla -remote "openurl(URL, new-window)"
If you rather want to be prompted for a URL and do not want to specify it on the command line, use:
mozilla -remote "openurl()"
'mozilla-xremote-client' seems to do the same.
More (although not much more) can be found on Mozilla Unix Remote.
Next Item: Mozilla add-ons, plugins, options ...
Related Resources:
Mozilla End user documentation
Mozilla 1.0 Resources
Mozilla Unix
dmoz: Mozilla
Netscape Solutions (all platforms)
Revision / Modified: June 27, 2002
Author: Tom Berger
Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
要显示的版本 1.3 last modified by AdminWiki on 22/03/2004 at 09:45