Thursday 9 June 2011

Add an alternative to update-alternatives

Let's start from the use case: you install firefox4.0.1 anf just want it starts from the 'Web Browser' button in the lxde menu bar.

It looks it was about configuring the x-www-browser alternative.

I started from update-alternatives --install, but wasn't able to figure out how to name the 4 parameters.

While doing some tries, I deleted the /usr/bin/x-www-browser link, which pointed to /etc/alternatives/x-www-browser which was a link to /usr/bin/iceweasel.

I gave up and linked /usr/local/src/firefox/firefox to /etc/alternatives/x-www-browser and again to /usr/bin/x-www-browser and opla'! Not only the 'Web Browser' button works, but also the alternative stuff is ok:

sudo update-alternatives --list x-www-browser
/usr/bin/epiphany-browser
/usr/bin/iceweasel
/usr/local/src/firefox/firefox

1 comment:

Steve Mckellar said...

Thanks, this helped me out.

The command is:
update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/local/src/firefox/firefox 1