Date: Sun, 07 May 2017 12:53:49 +0530 From: Reshad Patuck <reshadpatuck1@gmail.com> To: freebsd-chromium@freebsd.org Subject: chrome --headless Message-ID: <2F7516BA-CFB3-4F55-8F8E-8D834F45B4EA@gmail.com>
next in thread | raw e-mail | index | archive | help
Hey, I want to use chrome with the --headless flag on a server without an X ser= ver running to get screenshots and/or print-to-pdf of a page=2E I have tried running it with xvfb on a freebsd current system=2E ``` root@FreeBSD:~ # service dbus onestart root@FreeBSD:~ # Xvfb :0 -screen 0 1024x768x24 & root@FreeBSD:~ # setenv DISPLAY :0 root@FreeBSD:~ # chrome --version Chromium 58=2E0=2E3029=2E81=20 root@FreeBSD:~ # chrome --headless --disable-gpu --no-sandbox --screenshot= --verbose http://example=2Ecom ``` This seems to just hang (runs on the command line without any output)=2E --- On a debian system with chromium (57=2E0=2E2987) installed from the packag= e repository, the command seems to run without an X sever (even xvfb) runni= ng beforehand=2E ``` root@debian:~# apt-get install chromium root@debian:~# chromium --version Chromium 57=2E0=2E2987=2E98 Built on 8=2E7, running on Debian 8=2E7 root@debian:~# chromium --headless --disable-gpu --screenshot --verbose h= ttp://example=2Ecom [0507/071136=2E814541:WARNING:audio_manager=2Ecc(321)] Multiple instances = of AudioManager detected [0507/071136=2E814714:WARNING:audio_manager=2Ecc(278)] Multiple instances = of AudioManager detected [0507/071137=2E002908:INFO:headless_shell=2Ecc(378)] Screenshot written to= file screenshot=2Epng=2E ``` The command exits without error and the screenshot=2Epng file is in the fo= lder where the command ran from=2E Some reference links: - https://developers=2Egoogle=2Ecom/web/updates/2017/04/headless-chrome - https://chromium=2Egooglesource=2Ecom/chromium/src/+/master/headless/REA= DME=2Emd - https://chromium=2Egooglesource=2Ecom/chromium/src/+/58=2E0=2E3029=2E81/= headless/ Best, Reshad
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2F7516BA-CFB3-4F55-8F8E-8D834F45B4EA>