How to take a screenshot on the Raspberry Pi
No matter what type of computer you are using, there will definitely be times when you need to take screenshots. Perhaps you want to write instructions that show others how to perform a task, or maybe you want to share something you've seen in an app or website.
It's easy to take screenshots on any Raspberry Pi model, at least if you use Raspbian, the official Pi operating system. The following instructions are done on Raspberry Pi 4 running the latest version of the operating system, Raspbian Buster, but they will certainly work on any other model and any recent version of the operating system. .
Take screenshots with Scrot and PrtScr
Take screenshots with Scrot and PrtScrRaspbian's built-in screenshot tool is called Scrot, and you can use it to take a screenshot of the entire screen at the touch of a button PrtSc
. After you click PrtSrc
, Scrot will save the PNG graphic file to the Home directory ( / home / pi by default), with the date and time as the file name.
However, you can also use Scrot via the command line to gain additional flexibility. For example, if you want to take a screenshot after a delay, you can open a Terminal window and type the command scrot -d
followed by the number of seconds of delay. For example, with a delay of 5 seconds, the command would be:
scrot -d 5
If you want to capture a specific window, use the -s option and then click the window you want and it will be saved. Create -sb if you want the outline of the window to be in the image.
scrot -sb
And if you want to give the file a different name, rather than the date and time, you can name the file after scrot. For example, this command will capture the selected window and name it myimage.png:
scrot myimage.png -sb
Use Gnome Screenshot
Scrot is great for the command line tool, but using a screenshot tool with a graphical interface is easier. The main graphical screen capture tool for Pi is Gnome Screenshot. You can install it by typing.
sudo apt install gnome-screenshot
As with any software installation, you'll want to make sure you have all applications and archives up to date before installation. So if you haven't done that recently, make sure you enter:
sudo apt update && sudo apt upgrade
Now, you can find Gnome Screenshot in the Accessories menu , listed as Screenshot.
Find Gnome Screenshot in the Accessories menuWhen you open Gnome Screenshot, you have the option of capturing the entire screen, a window, or whatever part of the box you draw around. You can also select the delay and allow the mouse pointer to appear in the program (by default not).
Screen capture options with Gnome ScreenshotAfter you have taken the screenshot, Gnome Screenshot gives you the option to copy it to the clipboard, so you can paste it into an image editor like GIMP or save it with the file name of your choice.
Gnome Screenshot gives you the option to copy to clipboardCreate shortcuts for Gnome Screenshot
A real downside of Gnome Screenshot is that, as soon as you save an image, the application will close and you need to relaunch it to continue shooting. It will take a lot of clicks if you take a lot of photos in one session.
Luckily, if you create a customized shortcut for the Raspberry Pi, you can assign Gnome Screenshot to any key combination you want. In fact, you can change the configuration to PrtSrc
launch Gnome Screenshot instead of Scrot. In short, you need to do the following:
1. Open the file /etc/xdg/openbox/lxde-pi-rc.xml to edit.
sudo nano /etc/xdg/openbox/lxde-pi-rc.xml
2. Add the following code somewhere in the section .
gnome-screenshot --interactive
Gnome Screenshot will be assigned CTRL
+ ALT
+ PrtScr
, but you can also override the normal start command PrtSrc Scrot by editing it in this section.
You should read it
- Instructions for using Screenshot HD to take screenshots
- How to take a screenshot?
- How to take a screenshot on Windows 11
- How to take a screenshot of only the Dock on a Mac
- 12 quick and simple ways to take screenshots of Acer computers
- How to Take Screenshots of an Active Window
- How to edit iPhone screenshots
- How to take a screenshot on a Mac without using the keyboard
- How to Take a Screenshot using Firefox and Windows
- How to Save a Screenshot
- 18 tips for screen capture tool on iOS 11 you should not ignore
- How to Take a Screenshot on a Samsung Galaxy S5
Maybe you are interested
Disable Screenshots on Apple Watch
How to take a screenshot of the entire web page on Microsoft Edge
Who took a screenshot of your Snapchat Story?
Key combination to take screenshot on Windows and Macbook computers
Don't accidentally reveal your identity in screenshots and videos!
How to screenshot a certain area on Windows 10