Tuesday, June 30, 2009

Firefox 3.5 on Ubuntu 9.04

Well today the much anticipated speedy Firefox 3.5 arrived. Ubuntu probably won't push this one out as an update and I am not sure when Firefox's own auto-update would provide this upgrade, so if you're impatient as I, this is how to install it manually. Do read the whole thing through before deciding whether to do this, as there are some potential plugin issues involved!

Installation procedure
First you need to download and extract in an appropriate place. I'm extracting to /opt/firefox-3.5 such as to avoid collisions later when an official Ubuntu version is available:


casper@workstation/$ cd /opt/
casper@workstation/opt/$ sudo wget http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.5/linux-i686/en-US/firefox-3.5.tar.bz2
casper@workstation/opt/$ sudo tar -xjf firefox-3.5.tar.bz2
casper@workstation/opt/$ sudo mv firefox firefox-3.5
casper@workstation/opt/$ sudo rm firefox-3.5.tar.bz2 -f


Perhaps you notice that the download is a i686/32bit Linux release, this is because Mozilla do not presently build amd64/64bit versions. For this, we will have to wait for a version from our distribution. Now, lets check Ubuntu's browser settings:

casper@workstation:/opt$ sudo update-alternatives --display x-www-browser
x-www-browser - status is auto.
link currently points to /usr/bin/firefox-3.0
/usr/bin/firefox-3.0 - priority 40
Current `best' version is /usr/bin/firefox-3.0.


As you can see on my machine, only Firefox 3.0 is installed. We can add the newly downloaded version as an alternative and give it precedence on the system by issuing:

casper@workstation/opt/$ sudo update-alternatives --install /usr/bin/firefox-3.5 x-www-browser /opt/firefox-3.5/firefox 50


Also, we can make it default:

casper@workstation/opt/$ sudo update-alternatives --set x-www-browser /opt/firefox-3.5/firefox
Using '/opt/firefox-3.5/firefox' to provide 'x-www-browser'.


However, it's still not default on the path. To make it so, Ubuntu needs to update its symlink from /usr/bin/firefox to /opt/firefox-3.5/firefox:

casper@workstation/opt/$ sudo rm /usr/bin/firefox
casper@workstation/opt/$ sudo ln -s /opt/firefox-3.5/firefox /usr/bin/firefox



Voila. Issuing "firefox" on the command-line should now start Firefox 3.5 just as Ubuntu's shortcuts should now also point to the new version. On initial launch, Firefox 3.5 will check your extensions and plugins, as well as use your existing bookmarks etc. from your users home as usual on Linux.

Caveats
Note that if you previously had the amd64/64bit version of Firefox and plugins, your plugins will no longer work! It is of course very easy to just use 32bit plugins instead. In my case, I just lifted the two plugins I am interested in (libflashplayer.so and libjavaplugin.so) from another 32bit installation, but you can simply use Synaptic package manager to install 32bit plugins if you do not have these already.

If you don't wish to have multiple versions and perhaps have already uninstalled the old 64bit 3.0 version, then you may simply place the files in ~/.mozilla/plugins/. However, if you wish to have both versions on your system, you should keep the 64bit stuff around and instead add the 32bit plugins locally to your 32bit Firefox 3.5 installation in /opt/firefox-3.5/plugins/.

It's annoying to be back to 32bit for the time being but I do love the speed of this new version, and I'm sure you will too.


Update: Turns out there's an easier way, explained in this blog entry: http://talkingincircles.net/2009/07/01/firefox-3-5-in-ubuntu-9-04-64-bit/


Post a Comment