Skip to content

rustup doc does not use the default browser #3048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SteveLauC opened this issue Jul 27, 2022 · 0 comments
Closed

rustup doc does not use the default browser #3048

SteveLauC opened this issue Jul 27, 2022 · 0 comments
Labels

Comments

@SteveLauC
Copy link

Problem

My default browser is chrome, and when I open a doc with rustup doc, it launches firefox.

Some extra environment information

$ neofetch | grep -i de
                                          DE: GNOME 42.2

$ xdg-settings get default-web-browser
google-chrome.desktop

$ xdg-mime query default text/html
google-chrome.desktop

$ echo $BROWSER # $BROWSER is not set


$ xdg-open --version
xdg-open 1.1.3

Steps

  1. open doc with rustup doc --xx

Possible Solution(s)

This seems to be a bug of xdg-open

$ xdg-mime query default text/html
google-chrome.desktop

As you can see, the default app for HTML file is chrome(my default browser), but it still use firefox to open my file.

$ xdg-open file:///home/steve/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html
# firefox is launched

Notes

A similar issue(#2008) has been filed before, but seems the cause of that issue is the outdated version of opener. And I checked that rustup is using the latest version of opener now, which is 0.5.0.

Rustup version

rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.62.1 (e092d0b6b 2022-07-16)`

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/steve/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.62.1 (e092d0b6b 2022-07-16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant