6.2 Browsers

FreeBSD does not come with a particular browser pre-installed. Instead, the www directory of the Ports Collection contains a lot of browsers ready to be installed. If you do not have time to compile everything (this can take a very long time in some cases) many of them are available as packages.

KDE and GNOME already provide HTML browsers. Please refer to Section 5.7 for more information on how to set up these complete desktops.

If you are looking for light-weight browsers, you should investigate the Ports Collection for www/dillo2, www/links, or www/w3m.

This section covers these applications:

Application Name Resources Needed Installation from Ports Major Dependencies
Firefox medium heavy Gtk+
Opera light light FreeBSD and Linux versions available. The Linux version depends on the Linux Binary Compatibility and linux-openmotif.
Konqueror medium heavy KDE Libraries

6.2.1 Firefox

Firefox is a modern, free, open-source stable browser that is fully ported to FreeBSD: it features a very standards-compliant HTML display engine, tabbed browsing, popup blocking, extensions, improved security, and more. Firefox is based on the Mozilla codebase.

Install the package by typing:

# pkg_add -r firefox

This will install Firefox 2.X, if you want to run Firefox 3.X, use instead:

# pkg_add -r firefox3

You can also use the Ports Collection if you prefer to compile from source code:

# cd /usr/ports/www/firefox
# make install clean

For Firefox 3.X, in the previous command replace firefox with firefox3.

6.2.2 Firefox and Java™ Plugin

Note: In this section and in the next one, we assume you have already installed Firefox.

The FreeBSD Foundation has a license with Sun Microsystems to distribute FreeBSD binaries for the Java Runtime Environment (JRE™) and Java Development Kit (JDK™). Binary packages for FreeBSD are available on the FreeBSD Foundation web site.

To add Java™ support to Firefox, you first have to install the java/javavmwrapper port. Then, download the Diablo JRE package from http://www.freebsdfoundation.org/downloads/java.shtml, and install it with pkg_add(1).

Start your browser, enter about:plugins in the location bar and press Enter. A page listing the installed plugins will be displayed; the Java plugin should be listed there now. If it is not, each user will have to run the following command:

% ln -s /usr/local/diablo-jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so \
  $HOME/.mozilla/plugins/

or, if you installed the Diablo JDK package:

% ln -s /usr/local/diablo-jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so \
  $HOME/.mozilla/plugins/

Then relaunch your browser.

6.2.3 Firefox and Macromedia® Flash™ Plugin

Macromedia® Flash™ plugin is not available for FreeBSD. However, a software layer (wrapper) for running the Linux version of the plugin exists. This wrapper also supports Adobe® Acrobat® plugin, RealPlayer® plugin and more.

According to the version of FreeBSD you run various steps are required:

  1. Under FreeBSD 7.X

    Install the www/nspluginwrapper port. This port requires emulators/linux_base-fc4 which is a large port.

    The next step is to install the www/linux-flashplugin9 port. This will install Flash 9.X, this version is known to run correctly under FreeBSD 7.X.

    Note: On FreeBSD versions older than FreeBSD 7.1-RELEASE you have to install www/linux-flashplugin7 and skip the linprocfs(5) part below.

  2. Under FreeBSD 8.X

    Install the www/nspluginwrapper port. This port requires emulators/linux_base-f10 which is a large port.

    The next step is to install the www/linux-f10-flashplugin10 port. This will install Flash 10.X, this version is known to run correctly under FreeBSD 8.X.

    This version will require the following link to be created:

    # ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so \
      /usr/local/lib/browser_plugins/
    

Once the right Flash port, according to the FreeBSD version you run, is installed, the plugin must be installed by each user with nspluginwrapper:

% nspluginwrapper -v -a -i

The Linux® process file system, linprocfs(5) has to be mounted on /usr/compat/linux/proc, if one wants to play Flash animations. This can be done via the following command:

# mount -t linprocfs linproc /usr/compat/linux/proc

This point can be automated at boot time with the addition of the matching line in /etc/fstab:

linproc    /usr/compat/linux/proc  linprocfs   rw  0   0

Then, start your browser, enter about:plugins in the location bar and press Enter. A list should appear with all the currently available plugins.

6.2.4 Firefox and Swfdec Flash Plugin

Swfdec is the library for decoding and rendering Flash animations. And Swfdec-Mozilla is a plugin for Firefox browsers that uses the Swfdec library for playing SWF files. It is still in heavy development.

If you cannot or do not want to compile it, just install the package from the network:

# pkg_add -r swfdec-plugin

If the package is not available, you can compile and install it from the Ports Collection:

# cd /usr/ports/www/swfdec-plugin
# make install clean

Then, restart your browser for this plugin taking effect.

6.2.5 Opera

Opera is a full-featured and standards-compliant browser. It also comes with a built-in mail and news reader, an IRC client, an RSS/Atom feeds reader and much more. Despite this, Opera is relatively lightweight and very fast. It comes in two flavors: a “native” FreeBSD version and a version that runs under Linux emulation.

To browse the Web with the FreeBSD version of Opera, install the package:

# pkg_add -r opera

Some FTP sites do not have all the packages, but Opera can still be obtained through the Ports Collection by typing:

# cd /usr/ports/www/opera
# make install clean

To install the Linux version of Opera, substitute linux-opera in place of opera in the examples above. The Linux version is useful in situations requiring the use of plug-ins that are only available for Linux, such as Adobe Acrobat Reader®. In all other respects, the FreeBSD and Linux versions should be functionally identical.

6.2.6 Konqueror

Konqueror is part of KDE but it can also be used outside of KDE by installing x11/kdebase3. Konqueror is much more than a browser, it is also a file manager and a multimedia viewer.

There is also a set of plugins available for Konqueror, available in misc/konq-plugins.

Konqueror also supports Flash; a “How To” guide for getting Flash support on Konqueror is available at http://freebsd.kde.org/howtos/konqueror-flash.php.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.