Page 1 of 1

Chromium-browser not creating screenshot

Posted: Fri Jul 12, 2019 10:02 am
by Aardappeltaart
I'm trying out the chromium-browser on a headless RPI4 Raspbian Lite:

Code: Select all

chromium-browser --version
Chromium 74.0.3729.157 Built on Raspbian , running on Raspbian 10

I'm not able to create a screenshot running headless:

Code: Select all

chromium-browser  --window-size=1280,1024 --screenshot --headless https://raspberrypi.org

No screenshot.png created.

Is --screenshot not supported on the pi, or do I need extra packages?

Re: Chromium-browser not creating screenshot

Posted: Sun Jul 14, 2019 6:40 pm
by DougieLawson
Forget that --screenshot parm. Install scrot and us that to capture what you need.

Re: Chromium-browser not creating screenshot

Posted: Mon Jul 15, 2019 12:42 pm
by klricks
DougieLawson wrote:
Sun Jul 14, 2019 6:40 pm
Forget that --screenshot parm. Install scrot and us that to capture what you need.
scrot is already installed by default and linked to [Print Screen] key.

Re: Chromium-browser not creating screenshot

Posted: Mon Jul 15, 2019 4:20 pm
by Aardappeltaart
Thx, but can you run scrot on a headless Pi?

--screenshot --headless is for running chromium on servers, and create screenshots for automated testing, so without X11

Quite nice actually.

Should file a bug report then, but where?

(BTW also selenium could not create screenshot)

Re: Chromium-browser not creating screenshot

Posted: Mon Jul 15, 2019 6:13 pm
by DougieLawson
If you run the RealVNC server you can run scrot with

DISPLAY=:0 scrot ...

from a command line.

Re: Chromium-browser not creating screenshot

Posted: Mon Jul 15, 2019 7:43 pm
by Aardappeltaart
yeah, but

Code: Select all

giblib error: Can't open X display. It *is* running, yeah?
And not using realvnc

AFAIK Chromium-browser can be installed on all debian/ubuntu based server installs (x64 & arm) to run headless/

Just tried it on Ubuntu Server on x64 and ARM, so why can't it be done on the Pi?

Re: Chromium-browser not creating screenshot

Posted: Mon Jul 15, 2019 8:02 pm
by DougieLawson
Probably because the code is broken. Get you coding pencil, your pencil sharpener and a coding pad. The source code is available.

Re: Chromium-browser not creating screenshot

Posted: Tue Jul 16, 2019 10:19 am
by Aardappeltaart
DougieLawson wrote:
Mon Jul 15, 2019 8:02 pm
Probably because the code is broken. Get you coding pencil, your pencil sharpener and a coding pad. The source code is available.
Thanks for the advice,

IMHO a bug report is the better option here.

Anybody knows the appropriate place for that, could be related to the special RPI fixes (GPU accelerated)

This seems obsolete:
https://github.com/raspberrypi-ui/chromium_patches

Re: Chromium-browser not creating screenshot

Posted: Tue Jul 16, 2019 10:29 am
by ShiftPlusOne