Installing Firefox 3.5 the right way in Ubuntu Jaunty 56

Posted by bikethetam Thu, 02 Jul 2009 03:45:00 GMT

Important update: The official Firefox-3.5 is now available in the universe repositories. You don't need to do any of the following, just "apt-get install firefox-3.5". No need for any ubuntu-mozilla-* line in /etc/apt/sources.list.

To uninstall firefox-3.5 that was setup using ubuntu-mozilla-*, follow the instructions at ubuntu-mozilla-security.

Only follow the instructions below if you want to be on the bleeding edge.

 

Firefox 3.5 was officially released yesterday and it brings significant improvements in terms of speed, tab management and support of HTML5. Ubuntu does not automatically propose the upgrade so you need to help the system find the newer packages. Let's start by listing the least effective ways of getting those packages.

Installing from Canonical repositories

When searching inside of Synaptic Package Manager or using apt-cache, you are going to find firefox-3.5. Unfortunately, it's been there since the release of Jaunty and it has not been updated since then. At the moment, only the beta 4 for is available and believe me you don't want it.

$ apt-cache showpkg firefox-3.5
Package: firefox-3.5
Versions:
3.5~b4~hg20090330r24021+nobinonly-0ubuntu1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_universe_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_universe_binary-i386_Packages
                  MD5: b670b07084b5a79b912d14c4307acda4

Installing from mozilla.org

That's a better option. The process is the following:

  1. download the .tar.bz2 file
  2. uncompress it under ~/firefox
  3. make sure no other instance is already running
  4. start firefox 3.5 by running "~/firefox/firefox"

It works fine but there are several problems with this approach:

  • It completely shortcircuits the package manager which means that you will have to install future updates independently of the rest of the system.
  • When Ubuntu gets upgraded, it's very likely this firefox installation will stop working as it depends on libraries that will have changed version.
  • This firefox installation will the same ~/.mozilla directory to store your personal settings as the Ubuntu version of Firefox (3.0.11 as of today). Confusion and pain will inevitably follow. Unfortunately the last installation option described below has that same disadvantage.

 

Now the better solution.

Setting up the ubuntu-mozilla-daily repository

You can add to your system a repository maintained by the mozilla developers.

Add the following line at the bottom of /etc/apt/sources.list:

deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main

Let Ubuntu know the identification key of this repository:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE

Refresh your system cache:

sudo apt-get update

Now, same as with the first option, the package that you want is firefox-3.5. The difference is that now, the version available is the right one.

$ apt-cache showpkg firefox-3.5
Package: firefox-3.5
Versions:
3.5.1~hg20090629r26036+nobinonly-0ubuntu2~umd1~jaunty (/var/lib/apt/lists/ppa.launchpad.net_ubuntu-mozilla-daily_ppa_ubuntu_dists_jaunty_main_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/ppa.launchpad.net_ubuntu-mozilla-daily_ppa_ubuntu_dists_jaunty_main_binary-i386_Packages
                  MD5: b670b07084b5a79b912d14c4307acda4

You need to setup this package, latex-xft-fonts and also firefox-3.5-gnome-support

$ apt-get install firefox-3.5 firefox-3.5-gnome-support latex-xft-fonts

At this point, there are 2 different versions of Firefox coexisting on the system, 3.0.11 and 3.5.1. When you run "firefox" from the command line or when you select it from the Applications menu, version 3.0.11 is fired up. It might be convenient to make the newer version the default:

$ sudo su
$ cd /usr/bin
$ ll firefox*
lrwxrwxrwx 1 root root 11 2009-06-22 16:45 firefox -> firefox-3.0
lrwxrwxrwx 1 root root 32 2009-06-22 16:45 firefox-3.0 -> ../lib/firefox-3.0.11/firefox.sh
lrwxrwxrwx 1 root root 34 2009-07-01 21:17 firefox-3.5 -> ../lib/firefox-3.5.1pre/firefox.sh
$ rm firefox
$ ln -s firefox-3.5 firefox

The newly installed version is branded "Shiretoko". That's the name used to identify 3.5 during development.

By using this technique, you're guaranteed that Firefox will get updated regularly through the Ubuntu package manager and that compatibility with system libraries will be preserved.

The downside of this is that you will get a little more updates than the average users: fixes to 3.5 will be dropped here first before they are made available to all. As a consequence, it's not impossible that you will be among the first to find regression bugs.

Reference: http://www.asoftsite.org/s9y/archives/160-FAQ-Where-can-I-get-firefox-3.5-for-Ubuntu.html

Update 7/3/2009: safer ubuntu-mozilla-security repository?