Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
nomeata Merge pull request #1 from liblit/gitignore
Tell git to ignore various generated files
Latest commit 95b50a5 Mar 20, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian releasing package gtk-vector-screenshot version Sep 21, 2015
dummy-module Create a dummy module to prevent warnings with gtk2 apps Jun 24, 2011
.gitignore Tell git to ignore various generated files Mar 20, 2017
52load-gtk-vector-screenshot-gtk-module Xsession script Jun 24, 2011
ChangeLog Fix linking problem Jun 22, 2013
README Revert "Testcommit" Sep 21, 2015
clientwin.c Import clientwin.* from xwininfo git repo@123ff05 Jul 10, 2011
gtk-vector-screenshot.c gdk_error_trap_push() Oct 16, 2011
take-vector-screenshot.c Use Client_Window from clientwin.c Jul 10, 2011


gtk vector screenshot module

© 2011 Joachim Breitner <>

This gtk module allows you to take a screenshot of a running gtk-3 application
as a vector image, with fully scalable graphics and selectable text. It
supports rendering the application to PDF, SVG and PostScript.


To install the module, use the usual sequence:

./configure --prefix=/usr
sudo make install

And then ensure that the environment variable GTK_MODULES includes
gtk-vector-screenshot, e.g. in ~/.xsessionrc or by putting the file
52load-gtk-vector-screenshot-gtk-module into /etc/X11/Xsession.d.

If you do not install into /usr, you will have set GTK_PATH or pass the full
path of via GTK_MODULES when invoking the application.


You need to ensure that the gtk-vector-screenshot module is loaded by the
application, see section Installation. Distribution packages should take care
of this, but you might need to login again after you install the package.

Then run take-vector-screenshot, press the button, click on the window and then
you can select the filename to save the image under.

You can watch a screencast of the program in action at


The module is loaded by every application, and only activated using the
take-vector-screenshot program. The protocol is simple and based on X window
properties and X client messages: The gtk module sets the GTK_VECTOR_SCREENSHOT
property for each top-level X window to some arbitrary value (currently
"supported"). The control application sends an XClientMessage event to that
window of type GTK_VECTOR_SCREENSHOT and with event.window set to the receiving


The latest release can be found on

For the list of changes, see ChangeLog.

The code is hosted on

You can pull from the repository via
git clone git://
or if you are registered with gitorious, via

Feel free to submit patches, but also feel free to contact me first with your
ideas, in case I have different plans.

 * It only works with gtk3 applications.
 * The screenshot is taken the moment you press Save in the file chooser
   dialogue, not when you press the “Take vector screenshot” button.
 * Make the preview widget behave more sensible with regard to resizes.
 * Less hakish setting of the GTK_VECTOR_SCREENSHOT property.
 * Fallback code without IPC for windows, as for version 0.2.
 * Use GtkInvisible for the grab in take-vector-screenshot.c, as that is what
   its meant for, it seems.
You can’t perform that action at this time.