Capture URL Screenshot Chrome+Ubuntu

Capturing a screenshot documentation

Setup

  1. Add google chrome package location: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  2. Install: sudo apt install ./google-chrome-stable_current_amd64.deb

Capture

  1. Capture the url contents of siliconheaven.info google-chrome --headless --hide-scrollbars --window-size=1920,2000 --screenshot="siliconheaven.png" "https://siliconheaven.info"

Output

Command line

robin@wasp:~$ google-chrome --headless --hide-scrollbars --window-size=1920,2000 --screenshot="siliconheaven.png" "https://siliconheaven.info"
[1030/141707.481207:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[1030/141707.494154:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
[1030/141708.781469:INFO:headless_shell.cc(653)] Written to file siliconheaven.png.

File