Slackware and Eclipse PDT

When I first used Eclipse PDT in Slackware 13.0 it works out of the box. However, after frequent updates to Slackware Current branch it crashes often that makes it unusable. According to the discussion in LinuxQuestions.org it was caused by the behavior of Eclipse that still uses the old SeaMonkey 1.1.18 library to do its thing.

The current SeaMonkey I have is already at version 2.x. It takes some tricky steps to have a workaround on this. This solution was posted on that thread but was not clearly stated what exactly to do. So this is how we do it.

What to do?

Eclipse needs to use some of the SeaMonkey 1.1.18 stuff to make it work correctly, so we need to install them next to Eclipse while having the latest SeaMonkey. We will only use SeaMonkey 1.1.18 for Eclipse and nothing more.

  1. Put the Eclipse PDT on some directory of your choice. I choose to put them in /opt/eclipse.
  2. Download and install SeaMonkey 1.1.18 to /opt/eclipse/seamonkey- discussed later
  3. Create some script to run Eclipse using references to SeaMonkey 1.1.18 – discussed later

Installing Eclipse PDT

The latest Eclipse PDT I got is already at version 2.2.0 called Eclipse PDT Helios. We can simply download the appropriate packages that suits our machine and Linux version. For me I choose the Linux 32 bit package and choose the torrent download.

After downloading, I simply extract them to /opt/eclipse and I’m done. It crashes often as usual on my Slackware 13.1 + current as of September 2010.

Make sure that /opt/eclipse is readable by you and you have write permission to it. You can set ownership to your user account so that you’ll have the appropriate privileges. In the example below, lysender is my username.

chown lysender:users -R /opt/eclipse

After setting up a fully working Eclipse PDT (actually this is an upgrade already since I got the version 2.0 before), we now need to fix the SeaMonkey references.

Installing SeaMonkey 1.1.18

We need to go straight to the SeaMonkey Project website to download the package. On the SeaMonkey 1.1.18 release page, choose the Official Builds – Linux Full Installer which is in tar.gz format.

Extract it and run the installer:

tar xvzf seamonkey-1.1.8.en-US.linux-i686.installer.tar.gz
cd seamonkey-1.1.18*
./seamonkey-installer

The installer launches an installation window in X. Simply follow the instructions. When asked where to install, chose /opt/eclipse and SeaMonkey installer will automatically append its directory which will then become /opt/eclipse/seamonkey.

Note: Make it sure that you have set the target directory, otherwise it may overwrite the currently installed system. Review carefully.

As you’ve noticed, we installed it as an ordinary user, not root. That’s why we changed permissions and ownership to our username to make the installation seamless.

Create Eclipse launcher script

Okay, this is the last part of our job. We will not create the Eclipse launcher script that will properly set the Eclipse environment to make it running properly using the new MOZILLA_FIVE_HOME reference to SeaMonkey 1.1.18. I create my script at ~/bin/eclipse.sh. This is the content.

#!/bin/bash
export ECLIPSE_HOME=/opt/eclipse
export GDK_NATIVE_WINDOWS=true
export MOZILLA_FIVE_HOME=/opt/eclipse/seamonkey
${ECLIPSE_HOME}/eclipse $@

We’re done!

Now that we’re done, let’s run our beloved Eclipse PDT. Run the launcher script at ~/bin/eclipse.sh. You can run it on the terminal but what I did was create a shortcut to Desktop. It works last night for several hours without crashing.

This entry was posted in Eclipse PDT, IDE, Slackware and tagged , , , , , . Bookmark the permalink.

Random Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>