Fun with xdg-mime

I’m writing this down here so I don’t forget it.

I had an issue on my Ubuntu Linux box where when I right-clicked on a link in the terminal it would open in Firefox, even though my default browser is Chrome. Clicking on links in GUI applications worked just fine (they opened in Chrome); it was just links I tried to open from inside the terminal that would insist on opening in Firefox.

Normally this sort of thing would be fixed using the update-alternatives command, but not so in this case.

Here are the commands which fixed it:

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

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.