Using jmol and other Java applets under Firefox 4 on Linux

This short article explains what you need to to if you want to use Java applets in Firefox under Linux.

I recently installed FireFox 4 into my home directory under Kubuntu 10.04 because only version 3.6 is available in the package system and I wanted the new features now, especially sync. I need Java applet support in my browser to view protein structure data, e.g. in Jmol on the PDB website.

When you search google for this, various HOWTOs show up that suggest to install the IcedTea plugin from the openjdk package, but all this did for me was crash the browser whenever I tried to use Jmol (I didn’t try other applets). The solution seems to be to remove the IcedTea plugin, install the Sun JRE and use the module libnpjp2.so that comes with it.

Here are the commands for Debian-based distros (you’ll have to adapt them if you use SuSE, Fedora or other distros which don’t have apt). Remove the plugin and install Sun JRE:


sudo apt-get remove icedtea6-plugin
sudo apt-get install sun-java6-jre

Even if you installed Firefox manually into your home (I put it into ~/software/firefox4), it will look for plugins in your ~/.mozilla/plugins folder, so all you have to do is put a symlink in there like this:


cd ~/.mozilla/plugins
ln -s /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386/libnpjp2.so libjavaplugin_jni.so

Note that the path may be different for other distros and also if you are running a 64bit version of linux. Just search for libnpjp2.so if you aren’t sure where it is (The command find /usr -name libnpjp2.so should do it).

Here is a screenshot showing the 3D structure of triosephosphate isomerase (PDB entry 7tim) rendered in the Jmol applet:

Jmol under linux, firefox4

Advertisements

About dfspspirit

PhD student in bioinformatics, interested in photography, level design, digital image manipulation, architecture and, of course, bioinformatics.
This entry was posted in Bioinformatics, linux, troubleshooting and tagged , , , , . Bookmark the permalink.

One Response to Using jmol and other Java applets under Firefox 4 on Linux

  1. Hi there! I could have sworn I’ve been to this site before but after browsing through many of the posts I realized it’s new to me.
    Regardless, I’m certainly delighted I found it and I’ll
    be book-marking it and checking back regularly!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s