If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
This is a list of steps I took to setup a headless XServer and CutyCapt on Ubuntu. Please let me know if you run into any issues using these steps.
The first set of steps is to get the requirements for CutyCapt installed and the Headless XServer setup.
sudo apt-get update
sudo apt-get -y install build-essential
sudo apt-get install xvfb
sudo apt-get install xfs xfonts-scalable xfonts-100dpi
sudo apt-get install libgl1-mesa-dri
sudo apt-get install subversion libqt4-webkit libqt4-dev g++
Now lets download and install CutyCapt. Then we will run a couple of tests to make sure it is working properly.
svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
cd cutycapt/CutyCapt
qmake
make
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.png
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.html --out-format=html
I hope this helped and let me know if you have any feedback.
update: Per Paul’s comment, you may need to enable the aptitude backports repository in /etc/apt/sources.list, as this is off by default, to get the libqt4 libraries.
references
http://corpocrat.com/2008/08/19/how-to-install-xvfb-x11-server-in-linux-server/
http://cutycapt.sourceforge.net/
http://www.wonko.be/2008/01























7 responses so far ↓
1 Paul Danter // May 4, 2009 at 10:16 am
Hi Dave,
Great instructions. The only thing I’d add is that you also need to enable the aptitude backports repository in /etc/apt/sources.list as this is off by default. This enables you to get the libqt4 packages.
-Paul
2 Website Screenshots von der Linux Consolen mit CutyCapt » Server » Debian Root // Apr 18, 2010 at 8:05 am
[...] wie man es auf einem Debian Server hin bekommt. Heute hatte ich dann etwas Zeit und habe diese Anleitung für Ubuntu auf einem Debian Lenny ausprobiert. Ich war überrascht das ich nach nur 5 Minuten ein [...]
3 web development // Jun 25, 2010 at 9:49 pm
at first, it’s working perfectly, but right now i’m getting this error
Xlib: connection to “:99.0″ refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
CutyCapt: cannot connect to X server :99
/usr/bin/xvfb-run: line 173: kill: (12088) – No such process
4 frostb // Dec 7, 2010 at 3:33 pm
Dude!!! YOU saved the day and the night!! Thank you for the brilliant instructions! Worked perfectly fine on Debian lenny (VPS instance).
If I may just add in relation to the first comment by Paul, to unable backports, I had to:
$ vim /etc/apt/sources.list
Append:
# Backports repository
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
And:
$ aptitude update
Keep in mind the above applies for lenny.
Again – a huge Thank You!
5 Web Scraping Ajax and Javascript Sites « Data Big Bang Blog // Jan 11, 2011 at 2:49 pm
[...] Setting up Headless XServer and CutyCapt on Ubuntu [...]
6 Marvin // Apr 22, 2011 at 4:05 am
Hey,
great instructions! Now I’ve got a way to automatically take screenshots with my scripts. This works on Debian Lenny as well if you’ll mind the aptitude backports (http://backports.debian.org/Instructions/).
Thanks.
7 html to image – cutycapt | Techjot // Sep 28, 2011 at 3:51 pm
[...] I found this And did [...]
Leave a Comment