Had to install Chrome the other day to double check a web issue, and while I did not tell it to become my default browser in any way, links from Telegram (and only Telegram) were opening in it! Which meant seeing a youtube ad! No thanks.

Looking around a lot of posts I was seeing were from like 2012. Eventually found the info I needed to confirm why Chrome was opening links and then had to figure out some random commandline thing I'd never seen before to change it.

xdg-settings get default-web-browser xdg-settings get default-url-scheme-handler http xdg-settings get default-url-scheme-handler https

These all correctly showed firefox_firefox.desktop.

gio mime x-scheme-handler/https

showed com.google.Chrome.desktop instead!

To set a new value was as simple as:

gio mime x-scheme-handler/https firefox_firefox.desktop gio mime x-scheme-handler/http firefox_firefox.desktop

Now to post and then look at manpages to see what gio is.

Hmmm mind the formatting on this post also.