I love doing Google Web Toolkit-development, but let’s face it, developing it using the slow Dev-mode plugin written for Chrome takes the fun out of it. That’s why I was saddened when I updated Firefox to version 7.0 and released that the plugin was not present for it.
My mission: installing Firefox 6.0.2 which does have support for the GWT Dev-mode plugin, but not remove the newest version of Firefox.
These instructions are for Ubuntu 11.10, 64-bit, but should apply to any Linux distribution and chip architecture as long as you download the appropriate binary distribution of Firefox.
Installing Firefox 6.0.2
Download binary from: ftp://ftp.mozilla.org/pub/firefox/releases/6.0.2/linux-x86_64/en-US/firefox-6.0.2.tar.bz2 (you can browse available releases, by navigating your browser to the URL http://ftp.mozilla.org/pub/firefox/releases)
Execute the following commands (in a terminal, as root or through sudo);
tar xvf firefox-6.0.2.tar.bz2 mv firefox /opt/firefox6.0.2
Next, make sure your user has ownership of the directory by typing (still in the terminal, as root or through sudo):
chown askarby:askarby /opt/firefox6.0.2 -R
You would, however, have to substitute askarby:askarby for something different – unless your Linux user happens to be named askarby and be in the user group named askarby.
Preventing Firefox from updating itself
To disable Firefox’s automatic update functionality, we need to do the following two things. Edit the file /opt/firefox6.0.2/defaults/pref/channel-prefs.js, and first of all, comment out (add two slashes) the existing line, so that it says:
//pref("app.update.channel", "update");
next, append the following lines to the end of the file:
// Disable Auto Updates lockPref(”app.update.enabled”, false); lockPref(”extensions.update.enabled”, false);
Multiple Firefox profiles
Next, to launch your Firefox 6.0.2 version of Firefox, do NOT simply execute the command ./firefox as this will launch your default firefox install. Instead, execute the following command:
/opt/firefox6.0.2/firefox -no-remote -P ff60
The -no-remote argument allows you to run multiple instances of firefox under different profiles. The -P ff60 defines that you want to run firefox under a profile called ff60 (that name can be anything). A better, and more complete explanation of supported command line arguments for Firefox can be found at: http://kb.mozillazine.org/Command_line_arguments.
Since this is the first time launching with the ff60 profile. and it does not exist, you should be presented with a dialog. Please follow these steps to create the profile:
- Click the Create Profile… button
- Click the Next button on the first page of the wizard dialog presented.
- In the field underneath the “Enter new profile name:” label, enter ff60 (or whatever name you desided to give your profile, it must match the name passed to the argument).
- Click the Finish button
- Select the ff60 profile in the list box to the right of the buttons
- Click the Start Firefox button
Setting up Eclipse
To ease things, let’s create a small script that launches the Firefox browser with our profile arguments. In a terminal, type the following commands:
touch /opt/firefox6.0.2/launch.sh cat "#!/bin/bash" >> /opt/firefox6.0.2/launch.sh cat "/opt/firefox6.0.2/firefox -no-remote -P ff60 $1" >> /opt/firefox6.0.2/launch.sh chmod +x /opt/firefox6.0.2/launch.sh
- Open Eclipse in a workspace with a GWT project.
- Start a GWT Development mode session for your project
- In the Development Mode view:
- Right-click upon the URL, usually something like: http://localhost:8080/module/hostpage.html?gwt.codesvr=127.0.0.1:9997
- Hover over the Open With-sub menu, then click upon the Add a Browser item
- Enter the name of your browser in the Name field, I would suggest “Firefox 6.0.2″ (disregarding the quotation marks)
- Enter the location of our launch-script for the Firefox broser into the Location field, that would be “/opt/firefox6.0.2/launch.sh” (also disregarding the quotation marks)
