Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 293175

Summary: Default external web browser not found when running 32-bit Eclipse on 64-bit Ubuntu 9.04
Product: [Eclipse Project] Platform Reporter: Martin Oberhuber <mober.at+eclipse>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: bokowski, cgold, cocoakevin, grant_gayed, wbprio
Version: 3.5.1   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Bug Depends on:    
Bug Blocks: 293159, 330927    
Attachments:
Description Flags
Patch adding "/usr/bin/firefox" as location to check none

Description Martin Oberhuber CLA 2009-10-23 09:30:18 EDT
CQ:WIND00185536

BuildId: Eclipse-3.5.1-GTK 32-bit
Host: Ubuntu Desktop Edition 9.04, 64-bit with Sun 1.5.0_11 32-bit VM

The default external web browser (Firefox) is not found when running 32-bit Eclipse on 64-bit Ubuntu. This is a problem for our product, because as a result the Help system is not working, and also the internal browser is not working.

Workaround: 
Edit Window > Preferences > General > Web Browser to register a proper external web browser. The problem with this is, that due to bug 293159, finding the proper external web browser is nontrivial.

Engineering Details:
This behavior seems to be caused by missing 32Bit gnome libraries on the 64Bit Ubuntu Host:
libgnomevfs-2.so.0 => not found
libgnome-2.so.0 => not found
libgnomeui-2.so.0 => not found
It seems that there are no 32Bit compatibility libraries available for this (at least I could not find any so far). As a result, the GTK default browser detection code fails.

Proposed Solution:
When detection of the System Browser via GTK libraries fails, Eclipse should check whether any of "firefox", "mozilla", "netscape" are found in the System PATH. Launching the external browser does not require the GTK integration, if a browser is found in the system PATH.

Severity:
Not having a default external browser presents a severe limitation of initial out-of-the-box user experience. While the workaround is relatively easy from a technical point of view, that workaround does present a problem to end users. Therefore, if there is an acceptable technical solution for this (e.g. as proposed), it should be fixed. See also bug 288140, bug 286314, bug 291885, and bug 293159 for related issues.
Comment 1 Martin Oberhuber CLA 2009-10-23 09:49:02 EDT
To reproduce the scenario, following packages must be installed on a vanilla Ubuntu9.04 64-bit in order to get 32-bit JVM / Eclipse to run:

apt-get install ia32-libs
apt-get install libstd++6

Probably also the following are needed -- we have them on our system, but they may not be required for plain Eclipse SDK:

apt-get install libgettext-ruby1.9
apt-get install libgettext-ruby-data
apt-get install libgettext-ruby-util
apt-get install comerr-dev
apt-get install ss-dev
apt-get install doxygen
apt-get install g++
apt-get install texlive-latex-base
apt-get install bison
Comment 2 Kevin Barnes CLA 2010-01-06 10:59:58 EST
If the default browser is 64 bit, the 32-bit eclipse won't be able to use it. If it's not already installed the user will need to install a 32 bit XUL runner or firefox and point to it with either a system property or an environment variable. See the FAQ for more information http://eclipse.org/swt/faq.php#howdetectmozilla

Grant, do you have any other ideas?
Comment 3 Martin Oberhuber CLA 2010-01-13 05:40:32 EST
(In reply to comment #2)
> If the default browser is 64 bit, the 32-bit eclipse won't be able to use it.

I understand that the internal browser won't work in this scenario, but this defect is about the *external* browser. If /usr/bin/firefox is manually selected in the preferences, Eclipse can use it so there is a chance for getting this to work. See also bug 293159.
Comment 4 Grant Gayed CLA 2010-02-03 13:52:49 EST
Moving back to UI, this is not an issue with the Browser control, or with the Program class (since the machine does not have the Program's dependent libraries).  This is a request for eclipse to try harder if attempts to detect an available browser via Program fail.
Comment 5 Chris Goldthorpe CLA 2010-02-23 17:07:28 EST
This sounds as though it could be fixed by adding more places to look in org.eclipse.ui.browser using the "org.eclipse.ui.browser.browsers" extension point - is bug 293159 preventing that from working?
Comment 6 Martin Oberhuber CLA 2010-08-16 11:51:07 EDT
Created attachment 176682 [details]
Patch adding "/usr/bin/firefox" as location to check

Attached patch fixes the immediate problem - Firefox is auto-detected as the external browser to use on Ubuntu 9.04 64-bit when Eclipse runs as 32-bit, and opening help works out of the box.
Comment 7 Chris Goldthorpe CLA 2010-10-21 14:12:37 EDT
Patch committed to HEAD, Fixed
Comment 8 Martin Oberhuber CLA 2010-11-19 06:32:55 EST
Could this be backported to 3.6.2 please ?
Comment 9 Chris Goldthorpe CLA 2010-11-19 13:43:03 EST
Sure, can you clone this bug and edit the clone to indicate that you want the fix back ported to 3.6.2.