[ Prev ] [ Index ] [ Next ]

Firefox

Created Tuesday 22/8/2006

This document describes aspects of the mozilla browser firefox. The document covers plug-ins, mimetypes, firefox (and general mozilla) configuration (the so-called about: pages), the Chrome UI and Firefox on 64-bit linux.

1. Configuration

The firefox browser uses mozilla and as such it's configuration is pretty much the same. The location of the firefox configuration (such as where the preferences, mime types and bookmarks are kept) is located within ~/.mozilla/firefox/default/<profile> directory, where <profile> is the some string like fxecldtf.default. There will be one of these <profile> directories for each profile defined.

2. Plug-ins

The plug-ins for firefox are held within the plugins directory. For an rpm install, the location of Firefox's plugin directory is typically something like /usr/lib/firefox-<ver>/plugins, where <ver> is some version of firefox, such as 2.0.0.3. The rpm also includes the firefox binary firefox-bin and the wrapper script firefox, which locates the relevant lib directory based on the current architecture (see #12 Firefox and 64-bit linux). The firefox tarball (tgz) bundles the firefox directories all together, e.g., /usr/local/firefox/plugins. During installation, firefox creates a version-specific and a non-version specific location for firefox (same applies to mozilla). E.g., both of the following locations exist and both contain a plugin-in subdirectory (same comments for mozilla)

/usr/lib/firefox
/usr/lib/firefox-<ver>

2.B Plug-in versioning

Firefox is a mozilla based implementation and as such it uses the plugins installed to /usr/lib/mozilla/plugins as well. In general, install firefox specific plugins to /usr/lib/firefox/plugins and non-firefox specific plugins (i.e., those that work with all mozilla-based implementations) to /usr/lib/mozilla. It's probably not a good idea to install to version specific plugin directory unless the plugin only works with that specific version. For example imagine that plugin-A works with firefox (all versions), plugin-B works with firefox v1.7 only plugin-C works with any mozilla based implementation and plugin-D works with v12 mozilla-based implementations. In this case, the plugin installations might be:

bash $ cp plugin-A /usr/lib/firefox/plugins
bash $ cp plugin-B /usr/lib/firefox-v1.7/plugins
bash $ cp plugin-C /usr/lib/mozilla/plugins
bash $ cp plugin-D /usr/lib/mozilla-v12/plugins

2.C See also:

Other documentation related to plugins:

3. The java plugin

The Java JRE ships with a number mozilla plugin libraries each called libjavaplugin_oji.so. The difference is the version of the gcc libraries that they're compiled with.

In the days of the change over between gcc 3 and 2.9 this presented a problem and the version of the java plugin must be compiled with the same version gcc and gcc headers as the browser.

Today, this is less of an issue and typically, it's fine to choose the latest java plugin. At the time of writing, this was ns7 E.g.,

bash# cd /usr/local/firefox/plugins
bash# ln -s /usr/local/java/jdk1.5.0_03/jre/plugin/i386/ns7/libjavaplugin_oji.jdk1.5.0_11.i586/	so

image Tip: See also #9 common (T)> plugins

4. Acrobat

The Acrobat reader plug-in nppdf.so is delivered with the reader. To support inline browsing of pdf's, link this library into firefox's plugin directory:

bash# cd /usr/local/firefox/plugins
bash# ln -s /usr/lib/acroread/Browsers/intellinux/nppdf.so

The Acrobat rpm is packaged by DAG. If an rpm is not available for the current distribution, then try an http download of acroread (dag.wieers.com)

image Tip: See Acrobat's Browser Plugin How-To. located in the installation Browser directory

image Note: The Acrboat reader RPM (tested with version AdobeReader_enu-7.0.9-1.i386.rpm) includes the acroread script which launches the Adobe Reader. This script fails dismally in the function check_gtk_ver_and_set_lib_path, where it tires, failing spectacularly, to establish the installed GTK version. As long as the installed GTK version is >= 2.4, then the Acrobat will launch just fine and the call to the bogusly written shell function can be disabled. This is on about line 644. Simply comment out or delete the line:

check_gtk_ver_and_set_lib_path  "$MIN_GTK_VERSION"  ### returns 0 if found gtk >= 2.4

image Tip: See also #9 common plugins

5. mplayer plugin

To support inline mpg's via mplayer, be sure to download and install the mplayer plugin libraries. At the time of writing, the most recent version of these libraries is:

bash$ rpm -aq | mplayerplug
mplayerplug-in-2.85-1.1.fc3.rf

This rpm includes the mplayer plugin for mozilla, called mplayerplug-in.so Link this library into firefox's plugins:

bash# cd /usr/local/firefox/plugins
bash# ln -s /usr/lib/mozilla/plugins/mplayerplug-in.so

MPlayer and associated plugins are packaged by Livna.org and some MPlayer skins packages are available from Dries.

image Tip: See also #9 common plugins and mplayer

6. Realplayer/Helix

To support realmedia files the libraries nphelix.so and nphelix.xpt must be linked into the firefox plug-ins. These libraries are delivered with Helix, but these don't seem to work well in supporting realmedia from within the browser itself, so the best option is to install RealPlayer and use the libraries from there. E.g., assuming RealPlayer is installed to /usr/local/realplayer:

image Note: The symlinks can be made to firefox's plug-in directory or to the mozilla plug-in directory (as described by #2 Plug-ins)

bash# cd /usr/local/firefox/plugins
bash# ln -s /usr/local/realplayer/mozilla/nphelix.so
bash# ln -s /usr/local/realplayer/mozilla/nphelix.xpt

Adding these plug-ins provides support for callouts to the RealPlayer/Helix binary, but doesn't bind the realplayer mime types, which must also be done (see #8).

The Real Media helix plug-ins are bundled with the Real Player, available as rpm from https://player.helixcommunity.org/2004/downloads/ Grab Helix from there and relink the nphelix.{so,xpt} files.

image Tip: See also #9 common plugins

7. Java webstart

To support jnlp files to that clicking on one launches javaws requires that the java plugin is available to the browser (see #3) and that the mimetype for jnlp is defined. To bind mimetypes of type jnlp, edit the mimeTypes.rdf, which is contained with the firefox configuration directory (see #1) and add the following RDF definition:

<RDF:Description
    RDF:about="urn:mimetype:handler:application/x-java-jnlp-file"
    NC:alwaysAsk="false"
    NC:saveToDisk="false"
    NC:useSystemDefault="false"
    NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-java-jnlp-file"/>
</RDF:Description>
<RDF:Description
    RDF:about="urn:mimetype:externalApplication:application/x-java-jnlp-file"
    NC:path="/usr/local/java/jdk1.5.0_03/jre/javaws/javaws"
    NC:prettyName="javaws" />
<RDF:Description RDF:about="urn:mimetype:application/x-java-jnlp-file"
    NC:value="application/x-java-jnlp-file"
    NC:editable="true"
    NC:fileExtensions="jnlp"
    NC:description="">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-java-jnlp-file"/>
</RDF:Description>
<RDF:li RDF:resource="urn:mimetype:application/x-java-jnlp-file"/>

8. Realmedia mimetypes

To support realmedia files from within firefox, be sure that the RealMedia plugin libraries are available within firefox's plug-in directory (see #6). After this, edit the "mimeTypes.rdf" (see #1 for location) and add the following RDF definition:

<RDF:Description RDF:about="urn:mimetype:audio/x-pn-realaudio"
    NC:value="audio/x-pn-realaudio"
    NC:editable="true"
    NC:fileExtensions="ra,ram"
    NC:description="Real
    Media">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:audio/x-pn-realaudio"/>
</RDF:Description>
<RDF:Description
    RDF:about="urn:mimetype:externalApplication:audio/x-pn-realaudio"
    NC:path="/usr/local/RealPlayer10/realplay"
    NC:prettyName="Real Media"/>
<RDF:Description RDF:about="urn:mimetype:handler:audio/x-pn-realaudio"
    NC:alwaysAsk="false"
    NC:saveToDisk="false"
    NC:useSystemDefault="false"
    NC:handleInternal="false">
    <NC:externalApplication
    RDF:resource="urn:mimetype:externalApplication:audio/x-pn-realaudio"/>
</RDF:Description>
<RDF:li RDF:resource="urn:mimetype:audio/x-pn-realaudio"/>

9. Common 3rd party plugins

The following is a list of some useful 3rd party plug-ins. This is the content of the firefox plug-in directory (see #2), with the Java plug-in (#3), Acroread (#4), MPlayer (#5) and the Real Media helix plug-in (#6):

image Note 1: The mplayer plugins are separated into libraries (.so) and components (.xpt) and there are typically many of these pairs for different codecs, e.g., mplayerplug-in, mplayerplug-in-dvx, mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-wmp

image Note 2: Because firefox is a (lightwieght) mozilla implementation, it will also include plugins linked into the mozilla plugins directory. Typically, firefox loads it's own plug-ins and those found in:

/usr/lib/mozilla/plugins

It appears that plug-ins installed to the versioned mozilla directory are not linked in with firefox's plug-ins. E.g., with firefox 1.0.7 and mozilla 1.7.12 installed, firefox will:

image Note 3: Installing flash under 64-bit Linux is a bit tricky. See #10

image Note 4: The MPlayer plugin (mplayerplug-in) has been replaced with gecko-mediaplayer plugin, which works with 64-bit firefox (unlike the mplayerplug-in, which only works with 32-bit firefox)

10. Installing Macromedia Flash plugin for 64-bit linux

image Tip: At the time of writing (Aug 2007), the 32-bit Adobe Macromedia Flash plugin running under 32-bit firefox is preferrable as it coexists quite happily in a 64-bit environment. The Flash Plugin is available via yum and does not require the nspluginwrapper. Download and install Macromedia Yum RPM.

If choosing not to install via yum (see preceeding tip), then grab the nspluginwrapper packages :

bash $ wget http://www.gibix.net/projects/nspluginwrapper/files/nspluginwrapper-0.9.90.3-1.x86_64.rpm
bash $ wget http://www.gibix.net/projects/nspluginwrapper/files/nspluginwrapper-i386-0.9.90.1-1.x86_64.rpm

Then, get the flash rpm via wget:

bash $ wget http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-9.0.31.0-release.i386.rpm

Install the flash-plugin rpm, then install the flash plug-in to firefox, using the nspluginwrapper:

bash $ nspluginwrapper -i /path/to/flash.so

11. Firefox's about: pages

There are many different about pages implemented in Mozilla and most of these (but not all) are available to firefox. These are described in the following sections.

11.A. Identifying which plug-ins are loaded

Firefox (actually mozilla) provide a shortcut for showing which plug-in modules are currently loaded. Entering about:plugins in the address bar will load a page with the currently loaded plug-ins and their status.

about:plugins

11.B. Summary of about: pages

There is a useful description of firefox about: pages at mozillazine. These are summarised here:

12. Plug-ins with 64-bit Firefox

Installing plug-ins with the 64-bit mozilla firefox is a little quirky. Often there are no 64-bit implementation available (such as for macromedia flash or acrobat reader). However, it's possible and often preferable to use the 32-bit versions of plug-ins with the help of nspluginwrapper.

Installing the 64-bit nspluginwrapper requires that the 32-bit (i386) version is also installed. Download and install the current rpm release for nspluginwrapper from here. The current release (as at 2 Aug 2007) is:

After nspluginwrapper is installed, any 32-bit plug-in may be installed and used by the 64-bit firefox (or other mozilla) provided they are installed to /usr/lib/mozilla/plugins (the 64-bit plug-ins are installed to /usr/lib64/mozilla/plugins).

After installing a 32-bit plug-in, the nspluginwrapper libraries must be updated. This is done using the nspluginwrapper(1) binary, which is installed with the nspluginwrapper rpms. This is done with:

bash # /usr/bin/nspluginwrapper -i  /usr/lib/flash-plugin/libflashplayer.so
bash # /usr/bin/nspluginwrapper -v -a -u 

The first command tells nspluginwrapper library that a new 32-bit plug-in is installed. The second command updates the nspluginwrapper library with all installed plug-ins from the system and user directories:

To remove a plug-in use the -r option

bash # /usr/bin/nspluginwrapper -r /usr/lib/flash-plugin/libflashplayer.so

12.A. Installing Macromedia Flash

Install the 32-bit macromedia flash either via yum(1) or by tarball/rpm. The yum repo is probably the easiest.

bash # cd /etc/yum.repos.d
bash # wget http://macromedia.rediris.es/macromedia-i386.repo
bash # yum install -y flash-plugin.i386

The flash plug-in library libflashplayer.so is delivered with the rpm. Update the nspluginwrapper libary with the flash plug-in location, e.g.,:

bash # nspluginwrapper -i /usr/lib/flash-plugin/libflashplayer.so

Additional interface support can be added to the macromedia flash plug-in which provide extra features like sound via the OSS driver, OpenSSL interaction and ICU support. See HOW-TO document at:

http://labs.adobe.com/wiki/index.php/Flash_Player:Additional_Interface_Support_for_Linux

12.B. Installing acrobat reader plugin

First install Adobe Acrobat Reader (see gnome#9A). The acrobat reader rpm installs the acrobat reader plug-in nppdf.so. Update the nspluginwrapper with the location of the adobe 32-bit plug-in, as follows:

bash # nspluginwrapper -i /usr/local/Adobe/Acrobat7.0/Browser/intellinux/nppdf.so

12.C. Mplayer under 64bit Linux with 32bit Firefox

Support for mplayer can be provided when running 32bit firefox on x86_64 by linking to the relevant mplayer plug-ins and components. On Linux 64-bit, the x86_64 rpm's for mplayer, mplayer-gui should be installed and the i386 (32-bit) mplayer-plugin should be installed. This can be done with yum if the Livna repository is enabled:

bash # yum install mplayer mplayer-gui

After the mplayer binary and libaries are installed, the 32-bit version of the mplayer plug-in should be installed (on Linux-64bit, the Livna 32-bit repository should be enabled (see yum for more details)

bash # yum install mplayerplug-in.i386

Installing the 32bit plug-ins installs the xul components and mplayer libaries .so files to /usr/lib/mozilla/plugins. These components and plug-ins should then be symlinked into the Firefox 32-bit plug-in directory (i.e., the /usr/lib installation of Firefox and not the /usr/lib64 installation)

bash # cd /usr/lib/firefox-<ver>/plugins
bash # ln -s /usr/lib64/mozilla/plugins/mplayerplug-in-dvx.so
bash # ln -s /usr/lib64/mozilla/plugins/mplayerplug-in-qt.so
bash # ln -s /usr/lib64/mozilla/plugins/mplayerplug-in-rm.so
bash # ln -s /usr/lib64/mozilla/plugins/mplayerplug-in.so
bash # ln -s /usr/lib64/mozilla/plugins/mplayerplug-in-wmp.so

And then the xul components:

bash # ln -s /usr/lib64/mozilla/components/mplayerplug-in-dvx.xpt
bash # ln -s /usr/lib64/mozilla/components/mplayerplug-in-qt.xpt
bash # ln -s /usr/lib64/mozilla/components/mplayerplug-in-rm.xpt
bash # ln -s /usr/lib64/mozilla/components/mplayerplug-in-wmp.xpt
bash # ln -s /usr/lib64/mozilla/components/mplayerplug-in.xpt

12.D See also

man?ls

The www.mjmwired.net have a useful resources page which discuss installing Linux plug-ins and non-standard, non-opensource applications like Acrobat Reader and similar.

13. Add-ons/Extension

Firefox add-ons (previously called extensions) are 3rd party xul packages that provide additional features and functions to firefox. Firefox themes are also delivered as XUL packages, which are essentially zip files containing jars and chrome descriptors.

The following are urls and brief descriptions of Firefox addons and extensions that are generally pretty useful:

14. 32-bit Firefox on 64-bit Linux

Installing the i386 version of firefox will coexist with the 64-bit version as the former will install libraries to /usr/lib/firefox-<ver> and the latter to /usr/lib64/firefox-<ver>. However, both the i386 and the x86_64 will install (precisely the same) script to /usr/bin/firefox. The problem with this is that the script uses uname -m to determine where the firefox libaries are. In the x86_64 case, the firefox script will point firefox off to /usr/lib64/firefox-<ver>, which is not what's needed if running the 32-bit version is required.

The workaround for this is to force the firefox script to use /usr/lib/firefox-<ver>, which can be done by modifying the firefox script and forcing the MOZ_ARCH variable to have the value i386. To to this, locate the line that has MOZ_ARCH=$(uname -m) (which is about line 39) and change to MOZ_ARCH=i386.

15. Digital Signatures

The Mozila engine, on which both firefox and thunderbird are based, includes built in cryptographic modules. These modules allow a certificates in PKCS#12 certificates stores to be imported and then used to digitally sign messages and to encrypt content (e.g., in Thunderbird) and to specify certificates for digital communications (e.g., ssl and hhtp requests in Firefox). This process assumes that an RSA certificate file exists along with a Private Key. Refer to openssl for information on generating RSA certificate and priviate key pairs.

Mozilla (and applications based on it) only support certificates located within PKCS#12 certificate stores. Creating a certificate store in this format is simple and can be done with openssl. The --inkey option in the following comand can be left out if the private key is contained within the same file as the certificate.

bash $ openssl pkcs12 -export -in somecert.crt -inkey somekey.pem -out mycerts.p12

The PKCS#12 certificate can then be imported into (E.g.,) Thunderbird or Firefox using the Certificate Manager, which is typically available via the Preferences dialog. Select the View Certificates button and then choose the Import option, navigating to the .p12 file.

image Note: The certificates used for digital signing must be Trusted

The master password dialog that appears refer to the Mozilla certificate store password (if one was set). AFter entering the Mozilla master password, the password used when the certificates were exported to the PKCS#12 certificate store must be entered. The following images illustrate the import process in Thunderbird.

Step 1: This is the certificate management dialog. Certificates (within PKCS#12 stores) can be imported and deleted from here. This is opened from the Properties menu item and the certificate management actions are on the Certificates tab of the Advanced page (last icon on the right) of the Properties Dialog toolbar.

image

Step 2: Shows that there are currenctly no certificates in the mozilla certificate database image

Step 3: The Mozilla master password and the PKCS#12 certificate store password dialogs

image image

Step 4: After importing a PKCS#12 store, certificates are now available image

Step 5: Loaded certificates can now be selected for digital signing and encryption

image

16. Thunderbird

image Note: Thunderbird 2 is avaiable from mozilla.com Thunderbird

Thunderbird is a mozilla based mail client, which uses chrome for its UI. Much like firefox, thunderbird supports extensions via it's plug-in architecture. Configuration and installation is pretty straight forward, if done by rpm or yum. Like linux applications, the thunderbird source is also available via tarball. Compiling thunderbird requires a .mozconfig, in which the configuration options for the compile are defined.

Refer to the Linux From Scratch HOW-TO for a set of comprehensive notes for compiling thunderbird from source. Also includes notes for adding plug-ins and extensions like Enigmail and for integrating Thunderbird with other apps like Open Office, Firefox, Seamonkey and etc.

image Tip 1: The Linux From Scratch Thunderbird User Notes are worth a read image Tip 2: The Linux From Scratch site contains HOW-TOs for compiling applications from source

17. Thunderbird and Exchange Server

image Attribution: This section is lifted from MS Exchange Forums Post #6 by Guest

This is how Mozilla/Thunderbird LDAP works with Exchange 2000-2003:

1. The default LDAP port for Active Directory is 3268 (not 389) so make sure you've got this port open thru the firewall, and make sure to configure it in your LDAP account settings in Mozilla/Thunderbird.

2. The Base DN, must not be null (unlike Outlook Express, which permits an empty/null Base DN value). Enter value such as dc=yourdomain,dc=com.au

3. For Bind DN, be sure to enter a domain user which has permission to search the directory. Enter the Bind DN user name qualified by the NetBIOS domain name, for example mydomain\username

4. Thunderbird doesn't always seem to recognize that it needs to log on before querying. The easiest, most reliable way I have found to force it is to go to the Offline tab in the Directory Server Properties and click the Download button. This function seems to "see" that Active Directory wants a logon, so Thunderbird will display the logon dialog to let you enter your domain credentials. For the username, specify exactly the same thing you put into Bind DN.

5. Results are returned asynchronously to the Thunderbird Address Book, so you might see "No matches found" immediately after clicking the Search button. Wait a few seconds, and your results should show up.

6. Mozilla and Thunderbird default to a Search Filter of (objectclass=*) which will return lots of useless (non-email address) entries from Active Directory. You can override this with something like (objectclass=person) on the Advanced tab of Directory Service Properties. Depending on what kinds of addresses are in your Active Directory, you may need to refine this filter more (for example, if you've got mail-enabled Public Folders which you want to display).

7. The Address Book UI in Thunderbird is just clumsy. You CANNOT search an LDAP directory by simply selecting it on the left hand side and then entering your search in the "Name or Email contains" textbox. You must click the Advanced button to define an LDAP search. After you find your desired address(es) in LDAP, you should be able to copy it to your local addresses but the stupid UI only lets you look at the Properties or add it to the recipient list for a new message (by clicking the Write button).

18. Configuring google-talk in Gaim/Pidign

The google-talk protocol is XMPP and requires that port 443 to talk.google.com is accessible. The steps are: 1. Add a new connection with XMPP protocol 2. Provide username (e.g., foo) and domain (e.g., bund.com.au) 3. Ensure the Force old (port 5223) SSL check box is checked 4. Enter a Connect port of 443 5. Enter a Connect server of talk.google.com 6. Configure proxy as required (e.g., select HTTP to enter specfic proxy config or select Use Environmental Settings to use settings from...the environment!)

19. .ASP Handling

Many website's choose to implement their content using microsoft's Active Server Pages (ASP) framework with embedded Active X controls. Content provided in this way will not render under Linux using Firefox. The work around for this is to use wine and install Internet Explorer that way. The open source project IE4Linux provides a packaged solution to this problem.

Stuart Moorfoot © 22 Aug 2006 foo@bund.com.au


Backlinks: :mplayer :pulseaudio :todo