Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using import from Imagemagick to take screenshot of my second monitor every 15 seconds, and then later assembled the images using mencoder - thus creating a timelapse of what has been going on on my desktop during the time. This worked great when I used Gnome 2 - but as of late, my shots has gotten several artifacts in them. Black rectangles appearing in various places.

This does not occur with gnome-screenshot, but I need something that is powerful enough to do the equivilent to this:

# Capture 1920 x 1080 to file, starting at position 1680 x 0 (Monitor to the
# left is 1680x1050, monitor to the right is 1920 x 1080 - I want to capture the
# monitor to the right.)

while [ 1 ]; do
    import -window root -crop 1920x1080+1680+0 ~/img/foo-$(date +%y%m%d-%H%M%S).jpg
    sleep 15

and gnome-screenshot does not seem to have the options available to do this. I have not found any way to make the artifacts in the shots of import go away.

Does anyone have any clever suggestions for me?

share|improve this question

I have had some pretty good luck with xwd. I screenshot the whole desktop then use imagemagick to cut out just the portion I want.

I have also been using the tool's ability to pull from specific window titles.

Using the information on that blog post I have created the following python function which I use to take screenshots of a window with "mywindow" in the title bar.

def store_mywindow_screenshot():
    command = 'xdotool windowraise `xdotool search --title ".*mywindow.*"`'
    command = 'xwd -id `xdotool search --title ".*mywindow.*"` -out mywindow_screenshot.xwd'
    command = "convert mywindow_screenshot.xwd mywindow_screenshot_%s.png" %"%Y%m%d_%H%M%S")

As I have been capturing a window that is a 3d opengl app, i imagine xwd would be robust enough for your application

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .