I'm using Ubuntu 19.10 and I have the Signal messenger desktop application installed.
I have installed rustup yesterday, by following the steps in "the book".
When I run rustup doc or rustup doc --book, instead of getting the documentation in my browser (or whatever is supposed to happen), my Signal opens up (and does nothing).
I suspect this is not an issue with rustup itself, but rather some misconfiguration on my machine, possibly introduced by Signal. However, I'm not sure where to investigate.
Did this happen to anyone? Any idea what I should check?
If you go into system settings, I think there should be a "Default Applications" item - it might be under "About" in some versions, but I can't remember the exact ones as I'm not running Ubuntu atm. If you go in there, is Signal set as your browser/web application? Could you change it to your browser instead?
Might not be the problem, but it could be one good place to start if you haven't already checked?
From the rust source, it seems like it uses the opener library to open rustdoc urls (I assume rustup does the same?).
The opener library is then documented to use an library version of xdg-open embedded into the binary. If you copy a URL like file:///home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html and run
If so, I think we might be able to debug this further - or at least have a lead on further things that could be going wrong. (or at least a minimal bug report that doesn't depend on rust?)
FWIW, I have Signal installed here on Manjaro and no problem here. rustup doc opens in Firefox. So it must be something distro-specific.
Edit: In light of the new information revealed below, it probably doesn't affect me because the OS is a fresh install as of a few weeks ago, so I didn't have stale XDG settings to fix.
I've had this exact problem in the past. In my case, the Arch Linux install of Signal would set itself as the default application for HTML.
From memory, you can check and change which application will be used with xdg-mime query default text/html and set it using something like xdg-mime default firefox.desktop text/html.
I also used strace and saw it making edits to ~/.config/mineapps.list. I believe this is the main config file used by xdg-open (which is used by opener and similar crates on Linux).
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: