From owner-freebsd-ports-bugs@freebsd.org Wed May 10 10:18:03 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF33DD64551 for ; Wed, 10 May 2017 10:18:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5EE837A for ; Wed, 10 May 2017 10:18:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AAI3pZ055999 for ; Wed, 10 May 2017 10:18:03 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 219188] www/chromium support for --headless flag Date: Wed, 10 May 2017 10:18:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: reshadpatuck1@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: chromium@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 10:18:04 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219188 Bug ID: 219188 Summary: www/chromium support for --headless flag Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: chromium@FreeBSD.org Reporter: reshadpatuck1@gmail.com Assignee: chromium@FreeBSD.org Flags: maintainer-feedback?(chromium@FreeBSD.org) I want to use chrome with the --headless flag on a server without an X serv= er running to get screenshots and/or print-to-pdf of a page. Without running a display server, chrome errors out immediately because GTK= can not open the display. root@FreeBSD:~ # echo $DISPLAY DISPLAY: Undefined variable. root@FreeBSD:~ # chrome --headless --disable-gpu --no-sandbox --screenshot --verbose http://example.com [81628:457269248:0510/101444.736930:ERROR:browser_main_loop.cc(284)] Gtk: cannot open display:=20 --- When I try running it with xvfb. root@FreeBSD:~ # service dbus onestart root@FreeBSD:~ # Xvfb :0 -screen 0 1024x768x24 & root@FreeBSD:~ # setenv DISPLAY :0 root@FreeBSD:~ # chrome --version Chromium 58.0.3029.81=20 root at FreeBSD:~ # chrome --headless --disable-gpu --no-sandbox --screensh= ot --verbose http://example.com This seems to just hang (runs on the command line without any output). My guess is that chrome is droping the --headless flag and going ahead and initializing as if it were running on an actual system --- On a debian system with chromium (57.0.2987) installed from the package repository, the command seems to run without an X sever (even xvfb) running beforehand. root@debian:~# apt-get install chromium ... root@debian:~# chromium --version Chromium 57.0.2987.98 Built on 8.7, running on Debian 8.7 root@debian:~# chromium --headless --disable-gpu --screenshot --verbose http://example.com [0507/071136.814541:WARNING:audio_manager.cc(321)] Multiple instances of AudioManager detected [0507/071136.814714:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected [0507/071137.002908:INFO:headless_shell.cc(378)] Screenshot written to file screenshot.png. The command exits without error and the screenshot.png file is in the folder where the command ran from. --- Some reference links: - https://developers.google.com/web/updates/2017/04/headless-chrome - https://chromium.googlesource.com/chromium/src/+/master/headless/README.md - https://chromium.googlesource.com/chromium/src/+/58.0.3029.81/headless/ --=20 You are receiving this mail because: You are the assignee for the bug.=