25 May 2011

Eclipse Helios with Firefox 4 on Ubuntu Natty

I've just finished installing Kubuntu 11.04 on a spare partition, and I'm rather pleased with it, there were absolutely no problems with the usual suspects like X driver, sound or fake RAID.

The only regression I noted is that Eclipse 3.6.2 no longer supports an internal web browser. Ubuntu 11.04 comes with Firefox 4.x, and this is not currently supported by Eclipse SWT.

This thread gave me the hint how to fix it:
  • Install package libwebkitgtk-1.0-0 (do not use the newer version libwebkitgtk-3.0-0)
  • Add the following to eclipse.ini: -Dorg.eclipse.swt.browser.UseWebKitGTK=true
  • Create a symlink in /usr/lib to satisfy the SWT dependencies:
    ln -sf libwebkitgtk-1.0.so.0.6.0 libwebkit-1.0.so.2
Restart Eclipse and check Window | Preferences | General | Web Browser. The radio button Use internal web browser should now be enabled.

Update 2 Jul 2001: After upgrading to Eclipse Indigo 3.7.0, the internal browser works out of the box. I did not have to modify eclipse.ini. But it seems Eclipse now uses WebKit by default, so you still need to install the WebKit library and create the symlink if you haven't done so before.


wcaicedo said...

You're the best! it worked perfectly.

Nick B said...

Thanks, great fix! I'd been stuck using some XULRunner workaround from a previous Helios problem (wherein the JVM was crashing horribly)

Oh but the package is called (on Ubuntu Natty at least): libwebkitgtk-1.0

Harald Wellmann said...

@Nick B: You're absolutely right. I've fixed the typo. Thanks!

Jon said...

Thanks--worked on this for an hour before I found your post