“Plug In” Your Browser

In most cases, the Web browser included with your Linux distribution lacks features you’ve come to rely on — advanced multimedia, Java applets, and more. Here, learn how to assemble a better browser.

Recently, while ego surfing, I came across a blog entry written
by Linux Magazine reader
“Lazslo” ( "http://jusanoi.blogspot.com/2006/11/two-years-ago.html" class=
"story_link">http://jusanoi.blogspot.com/2006/11/two-years-ago.html
),
which referenced an article I wrote back in 2004 titled “Back
to the Future” ( "http://www.linux-mag.com/2004-07/hard_01.html" class=
"story_link">http://www.linux-mag.com/2004-07/hard_01.html
). In
that article, I discussed the state of the Linux desktop on the
64-bit processors available at the time, pointing out many
parallels to the transition to 32-bit desktops during the
1990’s. I also lamented some of the bonehead decisions that
Linux distributions were making at the time concerning the bundling
of 64-bit application software.

Well, guess what? It’s over two and a half years later,
and little has changed for the better. Linux distributions still
install the 64-bit version of the browser by default on 64-bit
versions of Linux (which are now in even more frequent use due to
the introduction of inexpensive, 64-bit desktop chips such as the
Intel Core Duo and the "i">Athlon 64 FX 2), and end-users remain plagued with
usability issues on certain sites because an out-of-the-box install
omits any number of necessary plug-ins.

This article isn’t a solution to the problem. Rather, it
should serve as a wake up call for Linux distributors, since the
problems that need to be addressed here are too far-ranging and
complicated for this short article. However, since I have to deal
with these same exact problems daily, I’ll leave you with a
few tips, and probably more than a few more questions. But first,
let’s start with the bitching and complaining.

The Root of the Issue

There are three distinct problems which are preventing end users
from properly viewing content on multimedia-rich web sites:

1.Binary
Distribution.
Several of the most common media formats in
use on the web currently only distribute binary-only versions of
their codecs, be they Linux-native (Macromedia
Flash, Adobe Acrobat, Java
) or based on Windows
(Windows Media, Quicktime). Because of
licensing issues and the inability to compile them natively as Open
Source, many of the Linux distributors (especially the completely
Open Source distributions, such as OpenSUSE,
Fedora, Ubuntu,
and Debian) do not
install these plug-ins by default, and end-users have to install
them manually.

2.Architectural
Problems.
Even if a Linux-native version of a plug-in is
available and an end-user can install it manually, the plug-in only
tends to come in 32-bit versions. Thus, 64-bit web browsers cannot
play them. The reason? Linux distributions and the "i">Linux Standard Base (LSB) maintain two separate library
repositories for both 32-bit and 64-bit applications, and neither
are able to “see” each other. While this problem could
potentially be solved by developing a “thunking”
architecture ( class="story_link">http://en.wikipedia.org/wiki/Thunking) for
Linux library formats, there hasn’t been much movement in
this area. Hello, Earth to Linux Standard Base: Fix this problem,
Houston!

3.Legal
Problems.
Several of the Linux-native media players, such as
VLC ( class="story_link">http://www.videolan.org) and "i">MPlayer ( "story_link">http://www.mplayerhq.hu) are capable of using
support libraries and codecs from Windows-native media players and
have plug-in capability on Linux browsers, but for a vast variety
of reasons, including the fact that some of the configurations
violate certain international treaties as well as the Digital
Milennium Copyright Act (DMCA), the libraries aren’t
installed by default. To make matters even more complicated, the
open source players mentioned above have to be compiled and built
separately for every single Linux distribution and have a long list
of library dependencies associated with them to support all the
reverse-engineered media formats. The open source players also are
subject to the same architectural problems listed above — the
64-bit versions cannot use the 32-bit codecs from Windows (which
are, by the way, illegal to distribute in the United States)
— only the 32-bit versions can.

Solving Some of These Problems Yourself

You can fix some of these problems, but
it requires patience and persistence, and in some cases, getting
your hands pretty dirty. So, lets’s begin.

Install your own Web Browser. Regardless
of whether you use a 32-bit or a 64-bit Linux distribution, if you
are inclined to view enhanced multimedia web content that is not
normally supported by your distribution, I recommend that you not
use the web browser that is installed and maintained by default by
your Linux distro vendor. Instead, I recommend you download the
latest release-quality version of your favorite web browser,
install it in a separate directory than the one that’s
already installed on your machine, and maintain and administrate
the plug-ins on that copy yourself. If you run a 64-bit version of
Linux, you’re going to need to do this anyway.

These days, I’m actually partial to "i">Flock ( "story_link">http://www.flock.com), a web browser that
currently none of the Linux distros install by default, although
there is talk of it being supported in Ubuntu in a future release.
I’ve mentioned Flock in a number of “On the
Desktop” columns in the past, because I think its a much
better web browser than Firefox. As of this
writing, Flock 0.78 was built on the
Firefox 1.5.08 code base, but has
significant enhancements for users of on-line photo-sharing
services (such as Flickr and "i">Photobucket), and sports improved RSS capabilities and
blog site integration that even the latest Firefox
2.0
doesn’t have. It also has built-in spell checking
and a number of other cool things that you would expect to find
after you’ve spent hours tweaking Firefox with all sorts of
add-on extensions that you have to go out and find on the web
yourself.

Head on over to the Flock.com website, and download the latest
32-bit version of the browser. It’s distributed as a tar.gz
file, which you’ll need to unpack with tar
xzvf flock-0.7.8.en-US.linux- i686.tar.gz
command from a
terminal prompt. If you’re not up for Flock and want to stick
with good ‘ol Firefox, go to the Mozilla.com site and
download the lastest 32-bit version. Note that you’ll want
the i686 build if you’re using a
modern Pentium 4- class chip.

Once you’ve downloaded either Flock or Firefox 2 and
unpacked it to your home directory, sudo su
to the root user, pull up your favorite file manager
(Nautilus on GNOME
and Konqueror on KDE)
and move the flock or "i">firefox directory you just unpacked into the
/opt directory (which is located off the
filesystem root) You’ll also want to set the permissions of
that directory and all its subdirectories to mode "c">755 (or rwxr-xr-x).

Next, you’ll want to create a launch icon for the new
browser on your desktop. In KDE, right-click and select Link to
Application. In GNOME, right-click and select Create Launcher.
Next, assign it a new name and a new icon. For both Flock and
Firefox, the icons are located under /opt/
browsername /icons. I like to use the
mozicon50.xpm file, since it’s at the
same scale as all the other desktop icons. For the executable name,
use the flock script under "i">/opt/flock, or the firefox script
under /opt/firefox. Use something like
“32-bit Flock” or “32-bit Firefox” for the
desktop icon name so you can distinguish it from your other
browser. You should now have a launch icon on your desktop and be
able to launch the new browser.

Getting Flashed. To view Flash-rich sites
like YouTube, CBS.com, Google Video, Tacobell.com, Doritos.com,
Disney.go.com, and Barbie.com (Hey, don’t you dare judge me),
you’re going to need the latest Adobe Flash
Player
plug-in. As of this writing, Flash 9
for Linux
was in beta and was available at "http://labs.adobe.com/downloads/flashplayer9.html" class=
"story_link">http://labs.adobe.com/downloads/flashplayer9.html
.
By the time you read this, it’s likely you’ll be able
to get it at "story_link">http://www.adobe.com/flashplayer. The Flash Player
is distributed as a tar.gz file. As with the browser installation
above, you can unpack it with the tar xzvf
filename.gz
command to create a
directory called flash-player-plugin-
versionnumber, which contains a file named "i">libflashplayer.so. Copy this file to "i">/opt/flock/plugins or "i">/opt/firefox/plugins, chmod the
file to 755, and you’re set for Flash
content.

Acrobat. The Adobe
Acrobat PDF
viewer is generally only available in commercial
Linux distributions, and then only installed as a standalone
application. Head on over to the Acrobat Reader download site
( class=
"story_link">http://www.adobe.com/products/acrobat/readstep2.html
)
and grab the appropriate version (RPM for
Fedora, Redhat, SuSE and OpenSUSE, .gz for
all others) for your Linux distribution.

With the RPM version, install it with rpm-Uvh
filename.rpm
. After doing that, you should be able to launch
Acrobat Reader as a standalone utility as "c">acroread. For the tar.gz version, simply unpack it with
the tar xzvf "i">filename.gz command and move the unpacked
directory under /opt, as you did with the
browser install. To make it work within your browser, copy the
nppdf.so file from the "i">/usr/local/Adobe/Acrobat7.0/Browser/intellinux directory
(or from "i">/opt/Adobe/Acrobat7.0/Browser/intellinux) to the
/plugins directory under "i">/opt/flock or /opt/firefox.

Java. While web-based Java applets
aren’t nearly as popular as they were about five years ago,
there’s still a number of major web sites, such as ScottTrade
and a few others, that make use of embedded Java applets and Java
Web Start applications. Some corporate, web-based VPN gateways use
it too. With Java now released under GPL Version 2, its likely
we’ll see a resurgence of Java web content again.

To make Java work in your browser, you’ll need to install
the 32-bit version of the Sun JRE 5.0
(Java 2 Standard Edition Runtime Environment
5.0
). While a 64-bit version of the JDK is available, only
the 32-bit version currently supports Java Web Start and Java
browser applets. You’ll want to head over to "http://java.sun.com" class="story_link">http://java.sun.com
and download the “Linux RPM in self-extracting file”
version, which you can then install with rpm-Uvh
jre-1_5_0_09-linux-i586.rpm
. After installing the RPM file,
you’ll need to do two things:

1.Create a symbolic link from
/usr/bin/java to "i">/usr/java/jre1.5.0_09/bin/java, so that the "c">java command works globally. If you already have a file
in /usr/bin/ named "i">java, rename it to java-old. (If
you are using an open source Linux distribution, the existing
/usr/bin/java is likely the GNU "i">gcc-java, the open source implementation of the Java
compiler. Sun’s JRE 5.0 supersedes it, and the open source
implementation can’t run Web Start applications or most Java
certified stuff decently, so don’t worry about it.) Note to
open source, independent Java VM implementation dudes: When your
JRE finally works properly with most Java bytecode out in the wild,
be sure to let me know.

2.Create a symbolic link from
/opt/flock/plugins/libjavaplugin_oji.so or
/opt/firefox/plugins/libjavaplugin_oji.so to
"i">/usr/java/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so.

You should now be able to run "c">java-version from the terminal prompt and get a result
like the following:

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)

You should also be able to run applets and Web Start
applications.

RealPlayer. If your Linux distro
doesn’t come with the Linux version of "i">RealPlayer 10, go pick it up at "http://www.real.com/linux" class=
"story_link">http://www.real.com/linux
. It’s distributed
as a self-extracting .bin file, which you
need to run with the command "c">./RealPlayer10GOLD.bin. The installation program will
ask you where to put the files — use "i">/opt/real. As with the Java installation, you’ll
need to create a symbolic link from "i">/usr/bin/realplay to "i">/opt/real/realplay. You’ll also need to copy
nphelix.so from "i">/opt/real/mozilla/ to "i">/opt/flock/plugins or "i">/opt/firefox/plugins.

MPlayer, VLC and XINE. Here we’ve
finally gotten to the meat of the matter: What to do to address the
Microsoft and Apple video formats. All three video players, Mplayer
( "story_link">http://www.mplayerhq.hu), VLC ( "http://www.videolan.org" class=
"story_link">http://www.videolan.org
) and XINE ( "http://www.xinehq.de" class=
"story_link">http://www.xinehq.de
), support playing of foreign
and proprietary video formats in the browser, provided you have the
32-bit version installed, the 32-bit Windows codecs for
Windows Media and "i">Quicktime, as well as the correct plug-in module copied
into /opt/firefox/plugins or "i">/opt/flock/plugins for that player.

Unfortunately, as I’ve said before, you’ll need to
go to third parties, because chances are your Linux distribution
wants nothing to do with software that violates international law,
and every Linux distribution requires a different implementation
and set of library dependencies to make those players work, so
there’s no standard way to get around the problem. Consult
the documentation on the above mentioned web sites and download any
binary versions, codecs and/or library dependencies needed, and
take any measures to avoid being charged with a felony in your
country or state of origin. Linux Magazine
does not condone the use of such software. Please do not taunt
Happy Fun Ball. Your Mileage May Vary, and
side effects including rash, shortness of breath, and convulsive
seizures may result in the using of these programs.

In previous “On The Desktop” articles, I’ve
covered some of what’s needed to get these players working in
Fedora, SUSE, and Ubuntu using automated software repository
scripts. Here’s where to get started: For OpenSuSE, see
"story_link">http://www.linux-mag.com/content/view/2378/0/1/0/

and "story_link">http://www.linux-mag.com/content/view/2609/. For
Fedora, see "http://www.linux-mag.com/content/view/2073/2307/" class=
"story_link">http://www.linux-mag.com/content/view/2073/2307/

and

class=
"story_link">http://www.linux-mag.com/content/view/1761/0/1/0/
.
For Ubuntu, Please see the December 2006 edition of Linux Magazine
on our piece about AutoMatix2 ( "http://www.getautomatix.com" class=
"story_link">http://www.getautomatix.com
), an automated
3rd-party software installer for Ubuntu.

Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62