How to Take a Screenshot on Raspberry Pi Using scrot
The simplest method for using 'scrot' is to simply input 'scrot' into the command window. This will save a screenshot of the entire Raspberry Pi window under the /home/pi directory under the format 'year-month-day-time_size_scrot.png'
Under the folder '/home/pi' you should see a screenshot with the current year as the first part of the '.png' file.
If you want to save the screenshot directly to a specific folder instead of having to copy and paste or move the screenshot, you can follow 'scrot' with the folder and filename desired for the screenshot, without having to ever move the file. The folder needs to exist already, so be sure that the directory exists before trying to 'scrot' to it.
The user may not want to take a screenshot of the entire screen, so 'scrot' also allows control of the screenshot window. This can be done using the following method:
Another method for getting a full screenshot of the current window is to include the border by adding a 'b' next to the 'u':
Another adjustment the user may want to do is introduce a delay before the screenshot is taken so they can prepare the screen after initiating the 'scrot' command. This can be done with the following introduction of the '--delay s' command:
It is easy to see how the user has quite a bit of control with the use of 'scrot' and the parameters available for alterations. The user can specify a delay, they can specify the window, and they can specify the location for the screenshot to be saved. It is an incredibly useful tool for instructors, teachers, and authors.
Resources:
https://www.howtoforge.com/tutorial/how-to-take-screenshots-in-linux-with-scrot/
https://www.tecmint.com/take-screenshots-in-linux-using-scrot/
See More in Raspberry Pi: