How to set Default Browser on Ubuntu from command line?

I'm using Ubuntu 10.04 with Fluxbox.

Since I installed Chromium-browser, it has been set as the default system browser (don't know why, don't know when, maybe I clicked accept somewhere without paying attention). Now every web link I click (for example from Skype), Chromium will be opened instead of Firefox.

How can I make Firefox my system default browser?

I need to set this preference using the command line.


Solution 1:

From the terminal, use

sudo update-alternatives --config x-www-browser

This will provide a list of installed browsers, similar to the following (which is mine):

There are two alternatives which provide `x-www-browser'.
Selection    Path                         Priority    Status
-------------------------------------------------------------
* 1          /usr/bin/chromium-browser    40          auto mode
  2          /usr/bin/firefox             40          manual mode

Press enter to keep the current choice[*], or type selection number:

Just hit the selection number for the browser you want.