Square Thoughts

an engineering student's blog

Archive for the tag “scrot”

Using Scrot (SCReenshOT) and Screen Grabs on the Raspberry Pi

While writing posts for my Raspberry Pi tutorials, I needed an easy and lightweight application to capture screen content. There are many options available for Linux including Gimp, gnome-screenshot and KSnapshot for KDE but I wanted something which I could use through the command line (because I just started scripting and it is kind of cool to throw commands at the terminal). So I grabbed the install package for Scrot (SCReenshOT) and started experimenting with it. It is lightweight, about 800kB and is customisable to store images in a variety of formats and resolutions.

Downloading the package

Open a terminal window and write

sudo apt-get install scrot

and provide the user password. Application data will be downloaded and Scrot installed.

Invoking Scrot

The application can be called from the terminal by calling

scrot [option] [argument]

where argument is the target file name.┬áIf an argument isn’t provided, a date-stamped file will be saved in the working directory.

Using Scrot

To capture the whole screen after a delay of 1 second and save it with the name “image.png” write (Here “1” denotes the time delay in seconds. You may increase it if you want to arrange windows on your screen before taking a snapshot)

scrot -d 1 image.png
Full Screen Capture

Full Screen Capture

To capture a selected window or selected portion of the screen use

scrot -s image.png
Selected window capture

Selected window capture


Arbitrary Screen Capture

Arbitrary Screen Capture

Need more information? Use the command

man scrot

for a list of available options.


Post Navigation