Linux screenshot tool that saves shots directly, without asking for a filename


I know how to take a screenshot on my Ubuntu, but I want to take many screenshots within a limited time (taking screenshots of a single execution of a program which I can not pause).

Is there a program that takes the "PrtScr" keyboard key in charge and just stores every screenshot without asking? The standard Ubuntu tool pops up a dialog to ask where I want to save the file, I would like a tool that doesn't ask and just saves on the Desktop or wherever as 00001.png 00002.png etc.

Best Answer

you can bind a keyboard-shortcut to whatever key you want and then fire one of these:

 # scrot -q 75 'shot-%Y-%m-%d-%H%M%S.jpg'


 # import -window root $(date +'shot-%Y-%m-%d-%H%M%S.jpg')

how you bind a key to an action depends on the window manager / desktop environment you are using.