Linux screenshot tool scrot operation skills

  

Scrot is a screenshot tool used in the Linux command line, can perform full screen, select and other operations, the following small series will give you a detailed introduction to the usage of the Scrot screenshot tool, through the operation example Learn the use of Scrot.

Installation Scrot

In Linux installed Scrot on Debian, Ubuntu or Linux Mint:

$ sudo apt-get install scrot

Installing Scrot on Fedora:

$ sudo yum install scrot

To install Scrot on CentOS, you can compile it from source by following these steps:

First enable on CentOS Repoforge, 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

Screen capture with Scrot

In the next section of this tutorial, I will describe how to pass several Different methods use Scrot to take screenshots.

1. Cut off the entire desktop

It's easy to capture the entire desktop. Just run the Scrot command, no parameters are needed, then it will save a screenshot of the entire desktop, saved as a (date stamp) .png file in the current file directory.

$ scrot

You can also specify the save destination folder and screenshot file name.

$ scrot ~/Pictures/my_desktop.png

2. Intercepting a specific window or rectangular area

Scrot allows you to select a specific window or define a rectangular area on the desktop. Take a screenshot. Use the following command to achieve:

$ scrot -s

After running this command, continue to click on any window with your mouse or draw a rectangle that can trigger on the selected window /Screen capture of the area. (LCTT translation, but also use the mouse, cut happy)

Sometimes the area or window you select may be partially obscured by other windows on the desktop. In this case, you need a little time to clean up that part before the screen capture. That's exactly what delay screenshots can do for you, as described below.

3. Delay Screen Capture

Delayed interception is useful in a variety of situations. Just before the screenshot, you may want to move the window, activate the menu, or trigger a specific time (such as a notification). Using the “-d N” parameter, we can delay the screen capture process by N seconds.

$ scrot -s -d 5

4. Adjust the quality of the screenshots

You can adjust the quality of the captured image from 1 to 100 (the higher the number, the better the quality) high). The default quality setting is 75.

$ scrot -q 50

5. Adjust the screen size

You can adjust the size of the captured image from 1 to 100 (the larger the number, the larger the size) . Reduce the size of the screenshot to 10% of the original image:

$ scrot -t 10

6. Pass the intercepted screenshot to other commands

Scrot allows you to send saves The screenshot image gives any command as their input. This option is useful when you want to do any post processing on the screen capture image. The screen file name/path follows the string after the “$f”.

$ scrot -e ‘mv $f ~/screenshots’

The above is an example of Linux using Scrot. Scrot not only captures the entire screen, but also delays screenshots and adjusts screen size. , intercepting specific windows, etc., this article also gave a detailed introduction to the installation of Scrot.

Copyright © Windows knowledge All Rights Reserved