Rustup doc opens Signal instead of the browser

Thanks a lot for the hint with xdg-open! That pushed me into the right direction.
Also, I liked the explanation of what Rust does to open links. :+1:

I tried your recommendation and ran:

xdg-open /home/cosmin/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html

It opened in Signal.

Then I wondered, would any HTML file open in Signal, from anywhere? I tried to open one from Nautilus (the file manager) and the same thing happened. I haven't noticed that before.

Looking around in the help and manual of xdg-open, I found out about xdg-mime.
I ran:

$ xdg-mime query filetype /home/cosmin/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html
text/html

Then:

$ xdg-mime query default text/html
signal-desktop.desktop

So that was the problem. I searched on the web for "signal xdg mime" and found an issue for Signal Desktop for this exact problem: Do not register signal-desktop.desktop as handler for text/html
As they mention it there, it's already fixed in the recent versions, but one has to repair the configuration manually:

xdg-mime default firefox.desktop text/html

I did that and now everything's back to normal. I can see the Rust documentation. :partying_face:

6 Likes