In this tutorial, we will check how to take screenshots on the Raspberry Pi 3, running Raspbian. This tutorial was tested on a Raspberry Pi 3 model B+, with the installation of the Operating System using NOOBS.
In this tutorial, we will check how to take screenshots on the Raspberry Pi 3, running Raspbian.
Personally, as a blogger, one of the first things I wanted to do when testing the Raspberry Pi was taking screenshots, so I could document the things I was exploring.
In order to easily take screenshots, we will use a tool called Scrot, a screenshot capturing utility that can be used on the Raspbian operating system.
This tutorial was tested on a Raspberry Pi 3 model B+, with the installation of the Operating System using NOOBS.
Depending on the version of Raspbian that you are using, it may already include Scrot or you may need to manually install it. In my case, I’ve installed version 4.9 of Raspbian, which already includes Scrot, as can be seen by the release notes.
You can easily check if you already have the tool installed by trying to obtain its version with the following command:
If the command is not recognized, then it means Scrot is not installed and you need to do it manually with the following command:
sudo apt-get install scrot
To take a screenshot with Scrot, simply open the command line and send the following command:
It should take a screenshot of the whole screen. By default, it will save the image with a name containing the timestamp when the screenshot was taken, and it will be stored in the current directory.  Nonetheless, it is possible to explicitly specify the filename, as can be seen here.
Figure 1 shows a screenshot taken with Scrot using the command explained before. The command was given on the Desktop directory without additional arguments, so the file was saved on that same directory with the default name, containing the timestamp.
Figure 1 – Screenshot taken with Scrot.
As mentioned, we can specify the filename with the following command:
Figure 2 exemplifies the usage of this command, where we have specified the name of the file. On the left, we can see that the saved image has the name we have specified in the command line.
Figure 2 – Taking screenshot with image name specification.
Scrot is a very useful tool with some more features that you can read about here. To finalize this post, we will analyze a command that allows to add a delay before taking the snapshot. To do it, we can use the following command (using a numeric value for the seconds):
scrot –d [SECONDS TO DELAY]
After that specified number of seconds, the screenshot should be taken automatically.
If we want to add a countdown, we simply need to add the -c argument:
Figure 3 shows the result of taking a screenshot with delay and countdown.
scrot –d [SECONDS TO DELAY] -c
Figure 3 – Timed screenshot with countdown.