Capture web page screenshots headless

Do you like this post? A regular project like the PlaneSpotter Color takes many hours of my free time to develop and maintain. Would you offer me a beer for my hard work if I was your neighbour? Modern technology called teleportation makes it easy to send me a beer. Just click here. Thank you!

For a while now I have been using the Amazon cloud to render web page previews for posts in Feederator. This solution is running in Amazons new free “beginner” quota. For a low load this works quite well, but it never worked to create a thumbnail for all incoming items. I guess it wasn’t working reliably because for every call a virtual framebuffer has to be started, then firefox, then the screenshot and so on… From time to time the available ports to the X server would run out…
So I was looking for another affordable and fast solution. So I found this post and followed the instructions to the letter: http://blog.mozilla.com/ted/2010/07/29/moz-headless-screenshot/ It worked until I wanted to compile the moz-headless-screenshot programm itself. I got the following error:

/usr/lib64/libssl3.so: undefined reference to `CERT_DistNamesFromCertList@NSS_3.12.6′
/usr/lib64/libssl3.so: undefined reference to `CERT_DupDistNames@NSS_3.12.6′
/usr/lib64/libssl3.so: undefined reference to `NSS_SecureMemcmp@NSSUTIL_3.12.5′
collect2: ld returned 1 exit status
make: *** [moz-headless-screenshot] Error 1

I contacted Ted, the writer of the above mentioned blog post and he told me

The mozconfig file in my directions probably contains a line like
“–enable-system-nss”. Try removing that, and the build will use the
in-tree copy of NSS instead.


I then removed the nss library references in his Makefile and recompiled and it worked. Now I’m trying to figure out, how I can package the whole stuff to run it on the cloud…

Posted by squix78

Leave a Reply