Raspberry Pi 3 Raspbian: Taking screenshots

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.


Introduction

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 [1] 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.


Installing Scrot

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:

scrot -v

If the command is not recognized, then it means Scrot is not installed and you need to do it manually with the following command [2]:

sudo apt-get install scrot


Using Scrot

To take a screenshot with Scrot, simply open the command line and send the following command:

scrot

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. [3] Nonetheless, it is possible to explicitly specify the filename [3], 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.

Scrot raspberry pi taking screenshot.png

Figure 1 – Screenshot taken with Scrot.

As mentioned, we can specify the filename with the following command [3]:

 
scrot [image-name].png

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.

Scrot raspberry pi taking screenshot with image name.png

Figure 2 – Taking screenshot with image name specification.

 

Timed screenshots

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) [4]:

 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:

 scrot –d [SECONDS TO DELAY] -c

Figure 3 shows the result of taking a screenshot with delay and countdown.

Scrot raspberry pi timed screenshot.png

Figure 3 – Timed screenshot with countdown.


References

[1] https://www.howtoforge.com/tutorial/how-to-take-screenshots-in-linux-with-scrot/#about-scrot

[2] https://www.howtoforge.com/tutorial/how-to-take-screenshots-in-linux-with-scrot/#scrot-installation

[3] https://www.howtoforge.com/tutorial/how-to-take-screenshots-in-linux-with-scrot/#scrot-usagefeatures

[4] https://www.howtoforge.com/tutorial/how-to-take-screenshots-in-linux-with-scrot/#delay-in-taking-screenshots

Advertisements
This entry was posted in Raspberry Pi and tagged , , , . Bookmark the permalink.

One Response to Raspberry Pi 3 Raspbian: Taking screenshots

  1. Pingback: Raspberry Pi 3 Raspbian: Python Hello World with IDLE | techtutorialsx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s