When running Compiz (Linux), let say I'm on Desktop #1 and I have an application running on Desktop #3. Is it possible to take a screenshot of the window (not the entire desktop) running on #3 from #1 ?

Well, I don't really expect anyone to answer this cause I've searched the entire net but I would feel guilty for not giving it a try.

migrated from stackoverflow.com Aug 24 '09 at 16:00

This question came from our site for professional and enthusiast programmers.


I use Ksnapshot on my Multi monitor setup. Allows for "window under cursor" and "region" amongst others.


Shutter can do this. As shown below, just select from the dropdown list the window you want. The list contains all apps currently running.



Why is compiz pertinent to this question?

If it's because you're having rendering issues (with opengl/video overlays) and you're using Intel graphics, grab the latest driver and switch your graphics mode to UXA in xorg.conf .. that might help.


If you know the id of the window, you can use

import -window <id>

To get the id of the window, you can use xprop.

However, although running with a composite manager should help in your case, it may still be possible that the data you obtain will simply be corrupted.


Using ImageMagick you can use import

import -window root MyScreenshot.png

Use another ID for the other window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy