7.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 6.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
Chromium medium medium Gtk+

7.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 the latest release version of Firefox, if you want to run Firefox Extended Support Release (ESR) version, use instead:

# pkg_add -r firefox-esr

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 ESR, in the previous command replace firefox with firefox-esr.

7.2.2 Firefox and Java™ Plugin

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

Install OpenJDK 6 through the Ports Collection by typing:

# cd /usr/ports/java/openjdk6
# make install clean

Then install the java/icedtea-web port:

# cd /usr/ports/java/icedtea-web
# make install clean

Make sure you have kept the default configuration options for both ports.

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 the browser is unable to find the plugin, each user will have to run the following command and relaunch the browser:

% ln -s /usr/local/lib/IcedTeaPlugin.so \
  $HOME/.mozilla/plugins/

7.2.3 Firefox and Adobe® Flash™ Plugin

The Adobe® 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.

  2. Under FreeBSD 8.X or Newer

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

    The next step is to install Flash 11.X from the www/linux-f10-flashplugin11 port.

    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/
    

    The /usr/local/lib/browser_plugins directory will have to be created manually if it does not exist on the system.

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

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

7.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.

7.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 example above.

The Adobe Flash plugin is not available for FreeBSD. However, a Linux® version of the plugin exists. To install this version, the www/linux-f10-flashplugin11 port has to be installed, then install the port www/opera-linuxplugins:

# cd /usr/ports/www/linux-f10-flashplugin11
# make install clean
# cd /usr/ports/www/opera-linuxplugins
# make install clean

You can check the presence of the plugin: start your browser, enter opera:plugins in the location bar and press Enter. A list should appear with all the currently available plugins.

To add the Java plugin, follow the instructions for Firefox.

7.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 supports WebKit as well as its own KHTML. WebKit is used by many modern browsers including Chromium. To use WebKit with Konqueror on FreeBSD:

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

Then in Konqueror, click “Settings”, “Configure Konqueror”, then “Change KHTML to WebKit”.

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.

7.2.7 Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable web browsing experience. Chromium features tabbed browsing, popup blocking, extensions, and much more. Chromium is the open-source project upon which the Google Chrome web browser is based.

Chromium can be installed as a package by typing:

# pkg_add -r chromium

Alternatively, Chromium can be compiled from source using the Ports Collection:

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

Note: Chromium is installed as /usr/local/bin/chrome, not /usr/local/bin/chromium.

7.2.8 Chromium and Java Plugin

Note: This section assumes Chromium is already installed.

Install OpenJDK 6 through the Ports Collection by typing:

# cd /usr/ports/java/openjdk6
# make install clean

Next, install java/icedtea-web from the Ports Collection:

# cd /usr/ports/java/icedtea-web
# make install clean

Start Chromium, and enter about:plugins in the address bar. IcedTea-Web should be listed as one of the installed plugins.

If Chromium does not display the IcedTea-Web plugin, run the following commands, and restart the web browser:

# mkdir -p /usr/local/share/chromium/plugins
# ln -s /usr/local/lib/IcedTeaPlugin.so \
  /usr/local/share/chromium/plugins/

7.2.9 Chromium and Adobe Flash Plugin

Note: This section assumes Chromium is already installed.

Configuring Chromium and Adobe Flash is similar to the instructions for Firefox. For more detailed instructions on installing Adobe Flash on FreeBSD, please refer to that section. No additional configuration should be necessary, since Chromium is able to use some plugins from other browsers.