Scrot doesn't allow taking multiple screenshots in batch. However, you can use bash (or any other languages') loop feature to achieve this.
Here is how I took 10 screenshots in files named screenshot_n.png
(where n
is the sequence number`) in delay of 1 seconds each.
for i in $(seq 1 10); do sleep 1; import -window root screenshot_$i.png; done
I used the import
tool here. It came from imagemagick. You can use scrot in place of import
. Change the sleep 1
line to match your desired delay. Check import
man page for more details.
You can use it in bash-function also like this
function shot()
{
for i in $(seq 1 $1);
do
sleep 1;
import -window root screenshot_$i.png;
done
}
Save it in .bashrc
file. You can use it in bash with this syntax shot n
, where n
is the number of screenshot you need to take`
Here is another command that uses scrot
. I used scrot's built-in delay feature instead of bash sleep
command here. Check scrot man page for more details. You can use this in bash-function as before.
for i in $(seq 1 10); do scrot -d 1 screenshot_$i.png; done
You can check the following question to get suggestions for other screenshot taking tools from command line