11

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?

ccpizza
  • 28,968
  • 18
  • 162
  • 169

1 Answers1

3

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!

browserless
  • 2,090
  • 16
  • 16
  • 1
    I am running Chrome headless under docker, so some of the recommendations in the link came useful. My understanding is that `--headless` is already fully functional in chrome stable (since v59) and there is no need anymore to use unstable/canary builds. It looks like there is no plan to decouple the graphical parts of chrome from the headless part, so pulling hundreds of megs of dependencies is inevitable. I switched from a vanilla Ubuntu docker image to a ready-made one from https://github.com/SeleniumHQ/docker-selenium so I can avoid setting up chrome in the docker image on every build. – ccpizza Nov 12 '17 at 07:29
  • Nice! I haven't looked at their dockerfile too deeply yet. Would be curious to see how they treat it – browserless Nov 12 '17 at 17:20
  • Did a little bit more elaborate of a write-up [here](https://docs.browserless.io/blog/2018/04/25/chrome-linux.html) on getting everything setup – browserless Apr 26 '18 at 21:34
  • browserless.io is not free. Rather choose open source solution like Cypress – Thor-x86_128 Mar 25 '22 at 05:19
  • @browserless This doesn't answer the question. `xorg` isn't found in the troubleshooting link. So is that a 'no you dont need it' answer? – AlxVallejo Jan 24 '23 at 14:53