Ubuntu – How to set which application is launched by ‘xdg-open’

chromiumdefault-browserxdg-open

I have run update-alternatives as well as the GNOME Preferred apps selection thing. And all point to have the Chromium browser as the default. Yet, when I run xdg-open http://askubuntu.com, Firefox is launched! Similarly, Emacs and Bazaar (bzr) also launch stuff in Firefox instead of Chromium.

Are there any additional settings which affect xdg-open functionality?

Something is definitely broken:

Update

I have purged Firefox:

  • update-alternatives – uses the Chromium browser
  • sensible-browser – opens the Chromium browser
  • xdg-open & gnome-open – opens using google-chrome which kindly tells me "it's not default browser"

!!!!

Best Answer

Chromium also has an option in its preferences to make it the default browser:

alt text

That should work, but it if doesn't, read on:

There are several keys in the GConf database that determine what browser is launched by xdg-open:

  • /desktop/gnome/url-handlers/unknown/command
  • /desktop/gnome/url-handlers/http/command
  • /desktop/gnome/url-handlers/https/command
  • /desktop/gnome/url-handlers/about/command

Make sure they are all set correctly:

  • Hit Alt+F2
  • Enter gconf-editor
  • Navigate to the above keys, they should be set to /usr/bin/chromium-browser %s.

alt text