Screenshots taken under the CentOS command line

Source: Internet
Author: User

Screenshots taken under the CentOS command line

Linux has many screenshot tools of different tastes, including screenshot programs dedicated to the desktop environment (such as KSnapshot in KDE, GNOME-screenshot in gnome, and Xfce Screenshooter ), or a common screenshot program (such as Shutter ). Scort ("SCReen shOT") is one of the most unique screenshot tools.Command Line screenshot tool. Although its interface is simple, Scrot is as powerful as other dedicated GUI-based screen capture tools. For example, Scrot supports delayed screenshots, screenshot quality/size adjustment, and line transmission. If you are a fan of command lines, Scrot should be another practical tool you have added to the arsenal. In this tutorial, I will describeHow to Use Scrot screenshots in the command line.

Install Scrot in Linux

To 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 screenshot

In the following section of this tutorial, I will describe how to use Scrot screenshots in several different ways.

1. Cut down the entire Desktop

It 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 area

Scrot 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 screenshots

Latency 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 Quality

You 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 size

You 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'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.