Aardappeltaart
Posts: 51
Joined: Wed Mar 02, 2016 11:32 am

Chromium-browser not creating screenshot

Fri Jul 12, 2019 10:02 am

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?

User avatar
DougieLawson
Posts: 36301
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Chromium-browser not creating screenshot

Sun Jul 14, 2019 6:40 pm

Forget that --screenshot parm. Install scrot and us that to capture what you need.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Chromium-browser not creating screenshot

Mon Jul 15, 2019 12:42 pm

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.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Aardappeltaart
Posts: 51
Joined: Wed Mar 02, 2016 11:32 am

Re: Chromium-browser not creating screenshot

Mon Jul 15, 2019 4:20 pm

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)

User avatar
DougieLawson
Posts: 36301
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Chromium-browser not creating screenshot

Mon Jul 15, 2019 6:13 pm

If you run the RealVNC server you can run scrot with

DISPLAY=:0 scrot ...

from a command line.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Aardappeltaart
Posts: 51
Joined: Wed Mar 02, 2016 11:32 am

Re: Chromium-browser not creating screenshot

Mon Jul 15, 2019 7:43 pm

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?

User avatar
DougieLawson
Posts: 36301
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Chromium-browser not creating screenshot

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Aardappeltaart
Posts: 51
Joined: Wed Mar 02, 2016 11:32 am

Re: Chromium-browser not creating screenshot

Tue Jul 16, 2019 10:19 am

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

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6020
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Chromium-browser not creating screenshot

Tue Jul 16, 2019 10:29 am


Return to “Troubleshooting”