Maker Portal

View Original

How to Take a Screenshot on Raspberry Pi Using scrot

See this content in the original post

See this content in the original post

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'

See this content in the original post

Screenshot of the entire screen

Under the folder '/home/pi' you should see a screenshot with the current year as the first part of the '.png' file.


See this content in the original post

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.

See this content in the original post

See this content in the original post

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:

See this content in the original post

Another method for getting a full screenshot of the current window is to include the border by adding a 'b' next to the 'u':

See this content in the original post

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:

Screenshot including the border of the current window

See this content in the original post

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: 

 

See More in Raspberry Pi:

See this gallery in the original post