Can't change the xdg-open url-handler to Firefox

I had this issue since Chromium made itself the default browser each time I installed it.

Using xdg-mime fixed it:

xdg-mime default firefox.desktop x-scheme-handler/https x-scheme-handler/http

On my Arch Linux system, this added two lines to ~/.config/mimeapps.list, associating HTTP and HTTPS with Firefox.

Now I can have both Firefox and Chromium installed with Firefox being the default browser.


Check the BROWSER variable in /etc/profile and /etc/environment and eventually in your ~/.bashrc. It is probably set to /usr/bin/xdg-open so you should consider to change it to avoid the recursive call.