Skip to content
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

0.4 doesn't seem to use either BROWSER or the default-browser from XDG. #9

Closed
sudoforge opened this issue Aug 21, 2021 · 2 comments
Closed
Labels
wontfix This will not be worked on

Comments

@sudoforge
Copy link

sudoforge commented Aug 21, 2021

rustup-doc version 1.24.3 (the current latest available version as of the filing of this issue) uses opener = "0.4.0", and neither the BROWSER environment variable nor the XDG default-browser property appear to be used to open the browser. Following the discussion in rust-lang/rustup#2642, it appears that support for the BROWSER environment variable isn't available with that version of opener. Looking at the 0.4.1 tag in this repository (and based on the discussion in the aforementioned issue), it appears that xdg-open should be used to open the URL. This doesn't seem to be the case.

➜ echo $BROWSER
qutebrowser
                                                                                                                        

➜ xdg-settings get default-web-browser
org.qutebrowser.qutebrowser.desktop


➜ rustup doc &
[1] 918976


➜ pstree 918976
rustup───sh───chromium─┬─chromium───chromium───19*[{chromium}]
                       ├─chromium───chromium─┬─chromium───5*[{chromium}]
                       │                     └─2*[chromium───12*[{chromium}]]
                       ├─chromium───7*[{chromium}]
                       └─19*[{chromium}]
@Seeker14491
Copy link
Owner

Version 0.4 on Linux exclusively uses the xdg-open script bundled with the library to open links. If it's opening an unexpected program, the problem lies in that script. The script comes straight from xdg-utils, and I don't intend on making modifications to that script, except updating it with upstream changes.

I can only recommend using v0.5, which explicitly supports the BROWSER environment variable, and also uses the system xdg-open if available.

@Seeker14491 Seeker14491 added the wontfix This will not be worked on label Aug 21, 2021
@sudoforge
Copy link
Author

sudoforge commented Aug 22, 2021

To any future readers, this was due to the xdg-mime configuration for text/html being set to chromium.desktop. To resolve this:

xdg-mime default <your preferred application> text/html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants