Browsers (Netscape, Mozilla, Firefox, Safari, Opera)

  1. Which Browser? Safari vs. Firefox etc.
  2. Noscript - blocks Javascript apps selectively
  3. How to synchronize bookmarks between machines
  4. How to unfreeze Mozilla when you can't start it
  5. 101 things that the Mozilla browser can do that IE cannot
  6. Get Mozilla
  7. Plug-ins
  8. Set up handling of MIME and content-types
  9. RealPlayer
  10. mplayer
  11. Java plug-in
  12. Java Web Start
  13. Flash/Shockwave plug-in for Netscape
  14. Printing from Firefox
  15. Fonts
  16. Customize
  17. Cool Mozilla features
  18. Old stuff

Which Browser? Safari vs. Firefox etc.

I chose Safari. Some reasons:

Reasons to use Firefox/Deerpark instead of Safari: Reasons to use Safari instead of Firefox/Deerpark:

How to synchronize bookmarks between machines

Firefox stores bookmarks in a file named bookmarks.html. Unfortunately, the file is stored in a directory named xxxxxx.default, where xxxxxx is different on every machine. Also, the directory is stored in a different place under Mac OS X than Linux. You can't use Unison to copy bookmarks from one machine to another. You have to do it by hand. To copy bookmarks from oryx to ibex, I did this on oryx:
EXIT FIREFOX ON IBEX
scp ~/Library/Application\ Support/Firefox/Profiles/5p7icup9.default/bookmarks.html \
ibex:.mozilla/firefox/jyuucyzv.default START FIREFOX ON IBEX

How to unfreeze Mozilla when you can't start it

When a system shuts down abnormally, it sometimes leaves a lock file laying around, and then when you restart, Mozilla says it's already running. To fix this, do "find ~/.mozilla -name lock" and then delete the file.

Get Mozilla

One way

Web to www.mozilla.org and get mozilla-i686-pc-linux-gnu-1.2.1-sea.tar. Save it in an ~siemsen/tmp. Then
(as root)
cd /usr/src
tar xf mozilla-i686-pc-linux-gnu-1.6b.tar
rm mozilla-i686-pc-linux-gnu-1.6b.tar
cd mozilla
./mozilla
select "Complete"
This'll create /usr/local/mozilla/, which contains the mozilla binary, so you have to add /usr/local/mozilla to your PATH in your .bashrc file. With this install, the plugins directory is /usr/local/mozilla/plugins.

Installing Mozilla the RPM way

I used this to intstall Mozilla 1.3 and 1.4. Later I installed 1.6b another way (see above).

Web to www.mozilla.org and get the RPMs for Red Hat 7.x. Download all ~11 of them and then

(as root)
rpm -i *.rpm
rm *.rpm
With this install, the plugins directory is /usr/lib/mozilla-1.3/plugins.

To deinstall 1.4, I did

rpm -e mozilla mozilla-chat mozilla-devel \  mozilla-dom-inspector mozilla-js-debugger mozilla-mail \  mozilla-psm

Plug-ins

Under Linux, plugins are "shared objects", aka shared libraries, so they have filenames that end with ".so". At start-up time, Mozilla loads whatever ".so" files that it finds in /usr/src/mozilla/plugins. To install a plugin, you just put the ".so" file into the directory and restart Mozilla. When Mozilla starts, it scans all the plugins, but doesn't execute them. You can see what plugins Mozilla knows about by doing Help->About Plugins. When Mozilla visits a link of a type that activates the plugin, the code in the ".so" file gets executed. If the plugin cade is wrong somehow, Mozilla might crash. It's ok to make symbolic links in /usr/src/mozilla/plugins to plugins that live in another directory.

When you let some automated plug-in installer install the plugin for you, it's likely to install it in the wrong place. For instance, Sun's Java plugin installer will install the Java plugin into /usr/lib/netscape/plugins, and Mozilla won't find it. Often, after installing a plugin, you have to manually move it to Mozilla's plugins directory or install a symbolic link from /usr/src/mozilla/plugins to where the plugin lives.

To see what plugin you're running, do Help->About plugsins or web to http://www.psc.edu/~jheffner/misc/JavaVersion.html

Set up Netscape handling of MIME asd content-types

For some help with the confusion, see The Content-type Saga
  1. Edit->Preferences
  2. Navigator->Helper Applications
  3. click New Type
  4. leave the Description blank
  5. set the Extension to mpeg
  6. set Open it with to /usr/bin/xmms
FYI, the above edits your .mozilla/siemsen/xxx/mimeTypes.rdf file. Do the same for:

RealPlayer

rpm -iv rp8.linux20.libc6.i386.cs2.rpm
rm ~/plugininstall.results
rm ~/mimeinstall.results
This installs /usr/X11R6/bin/realplay, which worked as of 1/26/02. The rpm also ran a thing that claimed it was installing the plugins. It did, but into ~/.netscape, not into ~/mozilla, so...
(as root)
cd /usr/src/mozilla/plugins
cp ~siemsen/.netscape/plugins/raclass.zip .
cp ~siemsen/.netscape/plugins/rpnp.so .
After restarting mozilla, I could play RealPlay snippets found at the CDNow home page.

mplayer

Mplayer claims to me able to play Windows Media Player files. Care@americafone sent me an HTML mail file. When displaying it, Mozilla popped-up a window that said
The page contains information of a type (application/x-mplayer2) that can only be viewed with the appropriate plug-in. Click OK to download the plug-in.
Clicking OK takes you to Microsoft. I got mplayer to try to play it. I did
as root
rpm -i \
mplayer-1.0pre3-1.i386.rpm \
mplayer-common-1.0pre3-1.i386.rpm \
lame-libs-3.92-3.i686.rpm \
libgcc-3.0.4-1.i386.rpm
This installed /usr/bin/mplayer. I then used Mozilla's Edit->Preferences->Helper Applications to define a new entry for application/x-mplayer2, pointing at /usr/bin/mplayer. I even gave it a file extension of asx. When I looked at the page, Mozilla still displayed the pop-up message. Sigh. I gave up. I don't get it.

Java plug-in

On 2006-12-28, I attempted to make sure I was getting the latest version of Java for Firefox. Macs have a very confusing "Java Embedding PlugIn" , so you can't use "about:plugins" to discover whether you have the latest Java plugins installed. The way to check is to run some applet and let the Java console tell you what version you have. So I upgraded the "Java Embedding Plugin", which involved deleting some plugins that came with Firefox. When I was done, Firefox crashed whenever I ran a Java applet. So I deleted Firefox. While browsing for a replacement, I came across a site that has Firefox builds that are optimized for various Mac processors. I found out that my PowerBook G4 has a 1750 processor (at least that's what the "machine" command says) and downloaded the optimized Firefox for 1750 processors from http://www.furbism.com/firefoxmac/. Seems to work. One twist: it's now named "DeerPark" instead of "FireFox" and the little logo looks different.

To install the Java plugin, install Java 1.4.2 as described in my Java notes. Then do

(as root)
cd /usr/src/mozilla/plugins
ln -s /usr/java/j2sdk1.4.2_03/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so
Then restart Mozilla and test it by visiting www.sun.com.

Java Web Start

JWS is a way that Java applications can be cleanly downloaded and run on a client machine. Do "man javaws". Trouble is, you first have to train Mozilla how to handle JNLP files. To do so:

Viewing a browser's Java Console

When an applet starts running, any output to System.outsprintln will show up in the Java Console. This includes exceptions and stack dumps. Showing the Java console works differently depending on which browser you are using.

Viewing the Java Console on Mozilla

Select Tools -> Web Development -> Java Console.

Viewing the Java Console on Safari

To enable the Java console with Safari, you do it outside of Safari with Utilities->Java->Java 1.4.2 Plugin Settings, then under the General tab, set Use Java console.

Viewing the Java Console on Internet Explorer

The Java console must first be enabled as follows: To then see the IE Java console, select View -> Java console.

Flash/Shockwave plug-in for Netscape

Web to the Macromedia home page. Click on Downloads - RealPlayer. Click on Shockwave (includes Flash). Save it in ~siemsen.

gunzip flash_linux.tar.gz
tar xf flash_linux.tar
rm flash_linux.tar
cd flash_linux
(read the README file)
cp libflashplayer.so /usr/local/mozilla/plugins
cp ShockwaveFlash.class /usr/local/mozilla/plugins

Restart Mozilla.

This worked! I was able to go to a page that previously generated a "your browser doesn't understand Shockwave" message. Like, at the Palm Computing website, there was a "demo of new features" thing that I could view.

Printing from Firefox

The following is obsoleted by CUPS, the Common Unix Printing System, which is now the standard on Linux, Mac OS X and UCAR's CISL. See my printing page.

To set up printing from Mozilla, there are two parts: defining the list of printers and setting up the lpr command.

To set up the list of printers, add this to the .bashrc file:

# Printers offered in Mozilla/Netscape "Print..." dialog boxes.
# These printers need to appear in /etc/printcap.
# Also, you have to add the "-c" commond-line option to the
# "lpr" command in the Mozilla/Netscape
# "Print...->Properties->Print Command" field
#
export MOZILLA_POSTSCRIPT_PRINTER_LIST="lj22 lj22duplex clj24a"
To set up the lpr command, I do Print and then Properties and I add "-c" after the "lpr". This gets saved until I restart Mozilla, so it works for all prints that I make until I restart Mozilla. I don't know how to get it to be saved for the next time I run Mozilla. Sigh.

Fonts

For a while, I had ugly fonts in Mozilla - real jagged-looking on my Dell 1901fp LCD screens. It was fixed when I set the DisplaySize variable in /etc/X11/xorg.conf.

I tried for a while to get fonts to look good in Firefox, with little luck. I finally settled on: go to Edit->Preferences->Content->Fonts & Colors->Advanced

Set Proportional to Serif
Set Size to 16
Set Serif to Bitstream Vera Serif
Set Sans-serif to Bitsteam Vera Sans
Set Monospace to Bitsteam Vers Sans Mono
Set Size to 14

Customize Mozilla

All Mozilla preferences get stored in XML format in, like, ~/.mozilla/siemsen/2d7lgra3.slt/prefs.js.

Disable Popup ads

To disable popup windows, select Advanced and then Scripts & Plugins from the Preferences window. Then uncheck the box that reads "Open unrequested windows".

Enable link processing

If a web page uses <link> tags, Mozilla can display a "Site Navigation Toolbar" that lets you conveniently navigate "up", "next", etc. To turn it on, do View->Show/Hide->Site Navigation Bar->Show Only As Needed.

Turn off download manager

By default, every time you download something, Mozilla will open a "download manager" window to show the progress, and leave the window around when the download is complete. To avoid this, do Edit->Preferences, then Navigator->Downloads and set it to Open a progress dialog.

Get rid of underlines under links

To reduce visual clutter, do Edit->Preferences, then Appearance->Colors and uncheck Underline Links.

Make "find in page" work for all text

By default, Ctrl-F does a "find in page", but it searches only the links in the page. To make it search all the text in the page, Edit->Preferences, then Advanced->Keyboard Navigation. Under Find As You Type, check Find automatically when typing within a web page and Any text in the page.

Cool Mozilla features

Select some text, right-click and launch a Google search.

Smooth scrolling in Mozilla 1.4. To turn it on, you have to edit the ~/.mozilla/defaults/user.js file.

Preferences

See A Brief Guide to Mozilla+Netscape Preferences.

When Mozilla starts, it reads the following JavaScript files to set up preferences

  1. all.js (in defaults)
  2. unix.js (in defaults)
  3. prefs.js (in user's profile)
  4. user.js (in user's profile)
When Mozilla exits, it rewrites prefs.js. You shouldn't edit prefs.js directly. So to set an an exotic preference that isn't available from Mozilla's Preferences dialog, create a user.js file in the "user'sprofile" directory. At the time I did this, the "user's profile" directory was ~/.mozilla/default/7dzmjn2n.slt.

Fonts

When Mozilla upgraded, there was too much space between lines, causing web pages to hold less vertically. I got some relief by setting the font to "Utopia" at 14 pixels. Setting fonts isn't intuitive - you don't select a font and a size. Instead, you select the font "type", where type is "Serif", "Sans-serif", "Cursive", etc. Then for each type you select the actual font, like "Utopia". I set the Proportional font type to "Serif" and the Serif font to "Utopia", and the Size to 14.

Some web pages specify fonts that look like crap on my laptop. To tell Netscape to override this stupidity, click Edit->Preferences.... In the resulting window, click Appearance->Fonts. In the right-hand window, click the radio button next to Use my default fonts, overriding document-specified fonts.

Get Netscape

On a machine that has Netscape, web to www.netscape.com.

Click Download. Click Netscape Browsers. Click Select Platform. Click Linux 2.2. This gets communicator-v476-us.x86-unknown-linux2.2.tar.gz. Save it in /usr/src. Gunzip and untar it.

  1. Click Download
  2. Click Netscape Browsers
  3. Click Netscape 6
  4. Click English
  5. Click Unix 2.2
  6. Save it in /usr/src
  7. Gunzip netscape-i686-pc-linux-gnu-installer.tar.gz
  8. tar xf netscape-i686-pc-linux-gnu-installer.tar
  9. rm netscape-i686-pc-linux-gnu-installer.tar
  10. cd netscape-installer
  11. Click Next
  12. Click Accept
  13. Select Full and click Next>
  14. yes, create /usr/local/netscape
  15. Click Install

cd /usr/src ftp gate.ucar.edu anonymous@ftp.netscape.com siemsen@ucar.edu

To run it, you have to execute /opt/netscape/netscape, so make a link as follows:

(as root)
ln /opt/netscape/netscape /usr/local/bin/netscape
When you first run it, it'll initialize you, and ask for you Netcenter member password. My username is petesiemsen, and my password is the usual one.

Customize Netscape

Set the home page

Set the home page. On the laptop, I could set my home page to a few seemingly equivalent things: If you use the first form, it's fast, and the browser will be able to follow links that start with "file:", like the link to "SuSE (local)" on my home page. But it won't be able to follow rooted references like the one to "/nets/" on my home page, and it won't be able to auto-complete the "index.html" part of URLs. So it's hopeless. I use the fourth form, which is equivalent to the second and third forms. Note that the 4th form doesn't work if httpd isn't running.

Turn off "smart" browsing

Turn off the annoying "guessing" of the URL you want to type.
  1. Edit->Preferences
  2. Navigator->Smart Browsing
  3. turn off Location Bar Autocomplete

Address comments or questions about this Web page to the Network Engineering & Technology Section at nets-www@ncar.ucar.edu. The NETS is part of the Scientific Computing Division of the National Center for Atmospheric Research, which is part of the University Corporation for Atmospheric Research.
Last modified: Mon Jul 10 17:45:31 MDT 2006