FOSS Content Creator Series: Simple Scripts - Screen Capture with scrot*

ID 777749
Updated 1/11/2019
Version Latest



When working on Debian* or a Debian-based system, screen captures can be taken and stored continuously on Linux* with no interruptions to your current work. 

Take screen captures in the background while working. Not interruptions, no wasted time - except sorting after, possibly.

What is this good for:

  • Validation documentation
  • Experimentation documentation
  • Developer Experience capture (running in the background)

* video could be an option but resource consuming.


OS: Debian*

Depends: scrot*

apt install scrot

Make the time variable editable with a gui front using zenity - if you want (apt install zenity)

Sample Simple Script - Screen Capture using scrot*

Duration: Runs for duration indicated in script (default: for i in {1..360}; )

Default time for each capture in seconds:  Every 5 seconds.

Images directory: ~/Pictures

The images may need a different dir to push to. You may need to create a directory to place images (mkdir thisdir). You could even add some code for making a dir to the script.  Name the script.


for i in {1..360}; 

scrot -d 5 '%Y-%m-%d-%H:%M:%S.png' -e 'mv $f ~/Pictures/';


Run script: