CutyCapt is a CLI utility to capture Webkit renderings of a webpage and the resulting image can be stored in a plethora of formats.
To install, first install the dependencies
#For sanity sake install epel-release yum install epel-release #On to the dependencies yum install Xvfb yum install xorg-x11-fonts* yum install qtwebkit-devel qt-devel
We installed Xvfb because we don’t want to run a full fledged desktop everytime for a screenshot. Onto installing CutyCapt itself. Issue the following:
yum install CutyCapt
Below is an example command of how to get a screenshot of a webpage:
xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=msn.com --out=msn.jpg
If you get warnings like the following,
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib64/dri)
You need to install the following driver:
yum install mesa-dri-drivers
This should fix it, you’re good to go.