Joachim Breitner

gtk-vector-screenshot code published

Published 2011-06-20 in sections English, Digital World.

After my post about the vector screenshots two days ago stirred quite some interest, I was hard-pressed to push the code out in proper form. So here you are: You can get release tarballs which can be installed with the usual configure && make && sudo make install. You can also get the code via git from the gitorious project page. Freshmeat and ohloh registration will follow soon. I don’t think though that I need more infrastructure, e.g. a mailing list would be overkill, unless the project becomes much larger than I expect at the moment. After all, I do prefer small projects.

Over the version that you saw in the screencast two days ago (which almost broke my server, as I included the video via the <video> tag, and every reader of my blog entry automatically started downloading the 2MB file), I have added support for SVG, PostScript and (hear hear) PNG, made the button much more visible and improved minor usability things.

Since Saturday, the work was covered in ycombinator’s hacker news and on If the interest stays high and I get positive feedback from users of the above code, I’ll also upload it to Debian.

I would really like to have this as a stand-alone program that can take screenshots of any running gtk-3 application, but I’m not sure if this is possible in a clean fashion. Can I somehow hook into a running glib application and call object methods there, maybe similar to how gdb would do it? Alternatively, I could install the module system wide, so that it is loaded into every application, and then somehow triggered (e.g. using a signalling mechanism based on X window’s property). Ideas and patches welcome!


Here is a similar project, that does GTK+ 2, maybe you can learn something from that:

Definitely upload it to Debian.
#1 foo am 2011-06-20
I know, that’s where I got the idea from of using a GTK_MODULE (instead of LD_PRELOAD hacks).
#2 Joachim Breitner (Homepage) am 2011-06-20
This is the best thing since porniness! In my company, we think about doing all our web application screenshots with epiphany/experimental and gtk-vector-screenshot. As soon as it is packaged in Debian, of course :~)
#3 Martin (Homepage) am 2011-06-22
Have you tried whether epiphany actually renders stuff with cairo in a way that gtk-vector-screenshot picks it up? gnome-terminal for example does not work. But if it would, that be even greater!
#4 Joachim Breitner (Homepage) am 2011-06-23
Let's follow
#5 Martin (Homepage) am 2011-06-22
Is it possible for you to rewrite this tool for windows?
Because the is no other tool like this in the whole web, especially no one for windows ...
#6 Chris (Homepage) am 2012-02-05
It could probably be ported to Windows and still only work with GTK-applications there. I don’t think it is possible to do this with arbitrary windows applications, though. So this means no...
#7 Joachim Breitner (Homepage) am 2012-02-05

Have something to say? You can post a comment by sending an e-Mail to me at <>, and I will include it here.