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.
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.
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
To capture a selected window or selected portion of the screen use
scrot -s image.png
Need more information? Use the command
for a list of available options.