Install Scrot in LinuxTo install Scrot on CentOS, follow these steps:
First enable Repoforge on CentOS, and then use the following command:
$ sudo yum install giblib-devel$ wget http://linuxbrit.co.uk/downloads/scrot-0.8.tar.gz$ tar xvfvz scrot-0.8.tar.gz$ cd scrot-0.8$ ./configure$ make$ sudo make install
Scrot screenshotIn the following section of this tutorial, I will describe how to use Scrot screenshots in several different ways.
1. Cut down the entire DesktopIt is very easy to intercept the entire desktop. You only need to run the scrotcommand. If you do not need it, a screenshot of the entire table will be saved later, and saved in the current file directory as a file (...png.
$ scrot
You can also specify the target folder and file name to save.
$ scrot ~/Pictures/my_desktop.png
2. truncate a specific window or rectangular areaScrot allows you to select a specific window or define a rectangular area on the desktop. Run the following command:
$ scrot -s
After running this command, click any window or draw a rectangle with your mouse, which can trigger the screen capture of the selected window/area. (LCTT annotation, but also use the mouse, cutting happiness)
Sometimes the area or window you selected may be blocked by other windows on the desktop. In this case, you need some time to clear the part before screenshots. That's exactly what latency screenshots can help you, as described below.
3. Delayed screenshotsLatency interception is useful in various situations. You may want to move the window, activate the menu, or trigger a specific time (such as a notification. With the "-d N" parameter, we can delay the screenshot process to N seconds.
$ scrot -s -d 5
4. Adjust screenshot QualityYou can adjust the quality of the captured image within the range of 1 to 100 (the larger the number, the higher the quality ). The default quality is 75.
$ scrot -q 50
5. Adjust the screenshot sizeYou can adjust the size of the captured image within the range of 1 to 100 (the larger the number, the larger the size ). Reduce the screenshot size to 10% of the source image:
$ scrot -t 10
6. Pass screenshots to other commands.Scrot allows you to send saved screenshots to any command as their input. This option is useful when you want to perform any post-processing on screenshots. The screenshot file name/path follows the "$ f" string.
$ scrot -e 'mv $f ~/screenshots'