Friday, April 14, 2006

Updating Firefox and Opera

The Washington Post's Security Fix Blog reports that there are updates for both the Mozilla Firefox and Opera web browsers.

Firefox actually has two updates: users of version 1.0.7, which is distributed with Ubuntu Breezy Badger, can upgrade to 1.0.8. Presumably this will make it to the Update Manager, but it wasn't in today's updates. Users of 1.5 or should upgrade to We'll talk about that here.

Note that in Linux you aren't notified of the availability of this download, as you are in Windows, so you have to look for it. Going to the Firefox Home Page reveals a button which tells you the current version of Firefox available for download, Clicking the button starts the download. Mine downloads automatically go to ~/downloads, a location that can be set in the Preferences.

I keep the current copy of Firefox in the directory /home/local/firefox, where local is an account where I keep software that isn't installed via deb or rpm and doesn't need to run as root. So the first thing is to move the old version of firefox, then unpack the new version:

$ su - local
Password:  xyzzy123
$ mv firefox firefox_1501
$ tar xvzf ~/downloads/firefox-

Now you've got a new version of firefox in /home/local/firefox. If that directory is in your path, then your old "firefox" command should launch the new version.

There are a couple of tweaks necessary, though. First, I want to copy all of the searchplugins I've added from the old firefox to the new:

$ cd searchplugins
$ rm *   # removes anything already there
$ cp ../../firefox_1501/searchplugins * . # you could use ln as well

Second, I want to use all of the plugins that I have in the old plugin directory. This is a little more difficult since most of the plugins are actually just soft links. So here's what we do:

$ cd ../plugins
$ ls -l ../../firefox_1501/plugins
lrwxrwxrwx  1 flashplayer.xpt -> /usr/lib/flash-plugin/flashplayer.xpt
lrwxrwxrwx  1 -> /usr/lib/flash-plugin/
-rwxr-xr-x  1
lrwxrwxrwx  1 -> /usr/lib/mozilla/plugins/
lrwxrwxrwx  1 -> /usr/lib/mozilla-firefox/plugins/
lrwxrwxrwx  1 nphelix.xpt -> /usr/lib/mozilla-firefox/plugins/nphelix.xpt

Note that is already available. Then link each plugin as needed:

$ ln -s /usr/lib/flash-plugin/flashplayer.xpt
$ ln -s /usr/lib/flash-plugin/
$ ln -s /usr/lib/mozilla/plugins/
$ ln -s /usr/lib/mozilla-firefox/plugins/
$ ln -s /usr/lib/mozilla-firefox/plugins/nphelix.xpt

Now Firefox is ready to role. The first time you launch the new version it will check for any updates needed to your extensions, and display a welcome screen. From then on it's back to normal.

This upgrade will be a lot easier when 1.5 becomes part of the standard Ubuntu distribution. This happens when the "Dapper" distribution is officially released, not for a while yet.

I don't have Opera installed on this machine yet, so let's see what we need to do. First, check the Synaptic package manager to see if it is available via Ubuntu. It is, in version 8.5.1, though the current update is 8.54. So first let's get opera running in any fashion. Launch the package manager

$ sudo /usr/sbin/synaptic

search for Opera, and download. You'll get a warning that opera can't be authenticated; ignore that. If you don't have the xlibs package installed, it will be.

Now Opera runs, but I get errors telling me that the Motif package manager and plugin need to be installed. Let me do a search for that and I'll report back to you later.