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

Quarto does not find chromium on Arch Linux, even though it is installed #4648

Closed
2 of 4 tasks
Tracked by #10170
astoeriko opened this issue Mar 6, 2023 · 10 comments · Fixed by #11187
Closed
2 of 4 tasks
Tracked by #10170

Quarto does not find chromium on Arch Linux, even though it is installed #4648

astoeriko opened this issue Mar 6, 2023 · 10 comments · Fixed by #11187
Assignees
Labels
chromium enhancement New feature or request
Milestone

Comments

@astoeriko
Copy link

astoeriko commented Mar 6, 2023

Bug description

I am trying to render a Quarto document that includes a Mermaid diagram. I get this error message:

ERROR: Chrome not found

No Chrome or Chromium installation was detected.

Please run 'quarto tools install chromium' to install Chromium.

However, I have Chromium installed through the Archlinux package manager pacman. chromium --version gives me Chromium 110.0.5481.177 Arch Linux, and I can also open the browser.

I suppose the problem is that the command is called chromium on my system, whereas Quarto expects it to be named chromium-browser.

I am running Quarto version 1.2.313.

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
@astoeriko astoeriko added the bug Something isn't working label Mar 6, 2023
@cscheid cscheid added enhancement New feature or request and removed bug Something isn't working labels Mar 6, 2023
@cscheid
Copy link
Collaborator

cscheid commented Mar 6, 2023

Unfortunately, we can't guess the name of chromium in every possible OS. Note that chromium, for example, does exist in other Linux distros and is not to be chosen over chromium-browser. See eg https://forums.raspberrypi.com/viewtopic.php?t=281697

We could attempt to resolve chromium after chromium-browser, but I'm not sure it's a net positive:

  • If we resolve chromium after chromium-browser, then a user who installed chromium by accident would now experience a bug, exactly for the reasons described in the Rpi forum post above
  • It seems like you can still quarto tools install chromium and that would still work
  • You could set up like this:
    mkdir -p ~/.local/bin # also ensure this is in your PATH
    ln -s `which chromium` $HOME/.local/bin/chromium-browser
    

If we were to resolve this properly, I think it should be with distribution-specific configurations that target chromium under Arch, and only under Arch. This would require a bigger architectural change, and be another situation where I don't know if the extra complication is worth the risk.

@astoeriko
Copy link
Author

astoeriko commented Mar 6, 2023

Thanks for having a look. I understand that it is difficult to account for differences in all the distributions.

I hesitate to use quarto tools install chromium because I do not really want Quarto to install software on its own, but linking to the existing executable sounds like a good option.
Maybe it would be best if distribution-specific packages do this “customization” step? (There is no official quarto package for Arch Linux, but there is a user-provided package in the Arch Linux user repository – that is how I installed Quarto.)

It could also be helpful to add a remark in this section of the Quarto documentation that Quarto expects chromium-browser and that it might be necessary to link that to chromium.

@cscheid
Copy link
Collaborator

cscheid commented Mar 6, 2023

Maybe it would be best if distribution-specific packages do this “customization” step? (There is no official quarto package for Arch Linux, but there is a user-provided package in the Arch Linux user repository – that is how I installed Quarto.)

That seems like a good idea, except that we're not the ones building quarto packages for Arch.

@astoeriko
Copy link
Author

except that we're not the ones building quarto packages for Arch

Sure, I know. I will see if I can suggest a change in the packaging instruction to the respective maintainer.

Feel free to close this issue, as there does not seem to be a lot that can be done about it on the Quarto side (other than better explaining the problem and how to solve it).

@cscheid
Copy link
Collaborator

cscheid commented Mar 6, 2023

Thanks! I'll keep it open to track this general kind of issue in the future.

@cscheid cscheid added this to the Future milestone Mar 6, 2023
@cderv
Copy link
Collaborator

cderv commented Mar 7, 2023

Unfortunately, we can't guess the name of chromium in every possible OS.

@cscheid just to share experience of our other R tools that are working with chrome

  • pagedown::find_chrome() will look for chrome for each OS, on Linux checking for c('google-chrome', 'chromium-browser', 'chromium', 'google-chrome-stable') and using first found. Setting env var PAGEDOWN_CHROME allow to specific a specific one to use
  • chromote::find_chrome() will so similarly, looking for google-chrome, chromium-browser and chromium , or using CHROMOTE_CHROME if set.

I think this cover all usage encountered with those tools.

do you think we could offer a configuration through an environment variable so that user can configure the chrome binary to use with Quarto ?

But if we can do same detection logic that would be great - we do some detection for R already to find where it is on Windows for example.

Anyway, sharing for reference and inspiration for when we can tackle this.

@cscheid cscheid modified the milestones: Future, v1.4 Mar 7, 2023
@cderv
Copy link
Collaborator

cderv commented Mar 8, 2023

For future reference, related issue where chromium is not found but an env var could help configure what to use #2980

@cderv
Copy link
Collaborator

cderv commented Jun 28, 2024

I have opened an macro issue to track a proper solution

@arinbasu
Copy link

@cscheid , I have Vivaldi installed on OpenSuse, but quarto cannot find it either, and linking Vivaldi to chromium-browser does not help either.

@mcanouil
Copy link
Collaborator

mcanouil commented Sep 1, 2024

@arinbasu Could you give the default path where it is located? As is your comment is not really useful unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chromium enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants