half-baked X11 framebuffer capture code