Possible Duplicate:
Take a screenshot via a python script. [Linux]
How can I achieve the capturing screen-shots and saving in a folder as achieved by the following python code in windows in linux (ubuntu)? I also want to run it at the OS start-up.
import os
import sys
import time
import Image
import ImageGrab
SaveDirectory=r'C:\Documents and Settings\gg\Desktop\office_docs'
---------------------------------------------------------
for i in range(10000):
img=ImageGrab.grab()
saveas=os.path.join(SaveDirectory,'ScreenShot_'+time.strftime('%Y_%m_%d_%H_%M_%S')+'.png')
img.save(saveas)
time.sleep(10)