Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I separately installed the Firefox Beta and Alpha channels, and have desktop configuration files pointing to them in ~/.local/share/applications. However, stable Firefox is being used as my default browser by the system. (Firefox Beta used to be used until I messed with the "Default Applications" in System Settings, where it is not listed.)

I tried running sudo update-alternatives --config x-www-browser to manually change it, but it's only recognizing Chromium and Firefox (stable) and showing them as a choice.

What can I do to get custom desktop configuration files in ~/.local/share/applications to be seen as default alternatives? I think I may have to fiddle with the desktop config files, or with mimeinfo.cache or mimeapps.list?

Running Oneiric.

Here is the content of the firefox-beta.desktop file I created:

[Desktop Entry]
Name=Firefox Beta
Exec=firefox-beta -P Beta -no-remote
Comment[en_US]=Firefox Beta Channel
Name[en_US]=Firefox Beta

[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox-beta -new-window about:blank
share|improve this question
up vote 14 down vote accepted

You're looking for the this command:

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /path/to/firefox-beta 100

That adds /path/to/firefox-beta to the x-www-browser alternatives with a priority of 100 (auto-switching to it unless there's something else with a higher priority). You can then use update-alternatives --config as usual. To remove it, run the following:

sudo update-alternatives --remove x-www-browser /path/to/firefox-beta

This removes that particular entry from the alternatives for x-www-browser.

share|improve this answer

You can use --set instead of --config, in other words:

sudo update-alternatives --set x-www-browser /path_to_executable
share|improve this answer
--set only gets you options listed by the --config option. So saith the documentation. For instance: $ sudo update-alternatives --set x-www-browser /bin/true update-alternatives: error: alternative /bin/true for x-www-browser not registered, not setting. – zanfur Nov 21 '11 at 10:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.