Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install Headless Chrome without X11 dependencies? [duplicate]

Is it possible to install and run chrome headless on a headless Linux box without installing the audio and xorg dependencies?

If not, then is there a special headless build of chrome/chromium which doesn't pull xorg and audio libs?

like image 837
ccpizza Avatar asked Oct 30 '17 11:10

ccpizza


People also ask

How do I run Chrome headless in Linux?

You can run Google Chrome in headless mode simply by setting the headless property of the chromeOptions object to True. Or, you can use the add_argument() method of the chromeOptions object to add the –headless command-line argument to run Google Chrome in headless mode using the Selenium Chrome web driver.

How do you use Chrome headless?

As we have already seen, you just have to add the flag –headless when you launch the browser to be in headless mode. With CLI (Command Line Interface), just write: chrome \<br> – headless \ # Runs Chrome in headless mode. <br> – disable-gpu \ # Temporarily needed if running on Windows.

Can Puppeteer run on linux?

Running Puppeteer on AWS EC2 instance running Amazon-Linux Now Puppeteer can launch Chromium to run your tests. If you do not enable EPEL and if you continue installing chromium as part of npm install , Puppeteer cannot launch Chromium due to unavailablity of libatk-1.0. so. 0 and many more packages.

What is Browserless io?

Browserless is a web-service that allows for remote programs to connect, pilot, and execute headless browser tasks — all inside of docker. It offers first-class integrations for puppeteer, playwright, selenium's webdriver, and a slew of handy REST APIs as well.


1 Answers

This troubleshooting doc on puppeteer should be of some help (https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md), it oultlines all the package necessary for running Chrome on a linux machine (more specifically for web servers).

Depending on your end-goal, I wrote a service that provides access to headless Chrome at https://browserless.io. More or less treats Chrome in hosted fashion, so you don't have to try and get it running yourself, which is a time consuming process.

In any case, hope one of those helps!

like image 124
browserless Avatar answered Sep 22 '22 16:09

browserless