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

Published: 01/12/2019  

Last Updated: 01/11/2019

By Marcia Wilbur

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.

Requirements:

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.

Example: ss.sh 

#!/bin/bash
for i in {1..360}; 
do 

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

done

Run script:

./ss.sh

 

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.