I’m trying to run google chrome with python and it’s not giving me any errors. I am trying to understand how to use the virtual monitor but it’s of no use.
ubuntu 20.04, python 3.12 tried xvfb-run
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Ibrahim,
Would you mind sharing the exact error messages you’re encountering?
Also, if possible, could you share a snippet of the code you’re running and the command you’re using with xvfb-run
? That will help pinpoint the issue better!
- Bobby
To run Google Chrome with Python in a virtual monitor environment like Xvfb
on Ubuntu 20.04, the most common issue arises from the configuration of the virtual frame buffer however, I might be mistaken. Can you share a bit more about your setup so that we can provide you with a better pinpoint answer?
Heya,
You can ensure that you run the script with xvfb-run
:
xvfb-run python3 chrome_xvfb.py
Also the chromedriver
must match the version of Google Chrome. As alternative you can use a different virtual display manager like VNC
(x11vnc
) to see what the virtual screen is rendering.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.