16

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
Icon=firefox
Terminal=false
X-MultipleArgs=false
Type=Application
StartupNotify=true
StartupWMClass=Firefox
Categories=GNOME;GTK;Network;WebBrowser;
Comment[en_US]=Firefox Beta Channel
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;
Name[en_US]=Firefox Beta

[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox-beta -new-window about:blank
TargetEnvironment=Unity
24

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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