Using Xvfb I can launch an application and take a screenshot.
What I'm wondering about is how to capture from an existing (dormant) X session.
Say from tty or over ssh.
From what I understand windows are unmapped and does not exist to preserve resources. Are there some tool that can map existing windows, workspaces etc in a virtual windowmanager and take a snap?
Or can one perhaps use
libx11 and create a snap by using
XShmCreateImage or similar?