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 |
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 3.6, if you want to run Firefox 3.5, use instead:
# pkg_add -r firefox35
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.5, in the previous command replace firefox with firefox35.
Note: In this section and in the next two sections, we assume you have already installed Firefox.
According to the version of Firefox you run various steps are required:
For Firefox 3.5
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).
Note: The above site does not provide binary packages for FreeBSD 8.X. It is however possible to use the packages for FreeBSD 7.X on an 8.X system. Simply install the misc/compat7x port before installing the package.
Alternatively, Diablo JRE (as well as Diablo JDK) may be installed using the Ports Collection (the relevant ports are java/diablo-jre16 and java/diablo-jdk16). Installing from the Ports Collection requires the source files (distfiles) to be downloaded manually due to licensing issues. Specific download instructions are provided when the make install command is invoked.
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.
Note: The commands above assume you are running the i386 architecture, amd64 packages are also available.
For Firefox 3.6
Install OpenJDK 6 through the Ports Collection by typing:
# cd /usr/ports/java/openjdk6 # make config install clean
Make sure you have selected the WEB option.
Each user will have to run the following command:
% ln -s /usr/local/openjdk6/jre/lib/IcedTeaPlugin.so \ $HOME/.mozilla/plugins/
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.
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:
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.
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.
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.
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.
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.