Here is an example:
Instructions for taking screenshots of Linux computers Picture 13
In this case, the scrot will wait 5 seconds and then take a screenshot.
Countdown before screenshot:
This tool also allows you to display the countdown while using the time delay option. This feature can be enabled using the -c command line option.
scrot –delay [NUM] -c
scrot -d 5 -c
Here is a screenshot for example:
Instructions for taking screenshots of Linux computers Picture 14
Image quality:
Using this tool, you can adjust the quality of screenshots at a rate of 1-100. High value means large size and low compression. The default value is 75, although the effect varies depending on the selected file format.
You can access this feature by using the --quality or -q option, but you must assign a numeric value for this option from 1-100.
scrot –quality [NUM]
scrot -quality 10
Below is a sample photo:
Instructions for taking screenshots of Linux computers Picture 15
So, you can see that the quality of the image is greatly reduced when the -q option is assigned a value close to 1.
Create thumbnail:
This utility also allows you to create thumbnails of screenshots. This feature can be accessed using the --thumb option. This option requires a NUM value, which is basically the percentage of the original screenshot size.
script --thumb NUM
scrot --thumb 50
Note: --thumb option ensures that screenshots are captured and saved at the original size.
For example, this is the original screenshot taken:
Instructions for taking screenshots of Linux computers Picture 16
And the following are saved thumbnails:
Instructions for taking screenshots of Linux computers Picture 17
Show multiple screenshots:
In case your device has multiple monitors attached, scrot allows you to take and display screenshots of all these screens. This feature can be accessed with the -m command line option.
scrot -m
Below is a sample photo:
Instructions for taking screenshots of Linux computers Picture 18
Perform actions on saved photos:
Using this tool, you can perform various operations on saved images - for example, opening a screenshot in the image editor like gThumb. This feature can be accessed with the -e command line option. Here is an example:
scrot abc.png -e 'gthumb abc.png'
Here, gthumb is the image editor that will automatically launch after the user runs the command.
The following is a snapshot of the command:
Instructions for taking screenshots of Linux computers Picture 19
And this is the result of the above command:
Instructions for taking screenshots of Linux computers Picture 20
So you can see that the scrot command took the screenshot and then launched the gThumb image editor with the image taken as an argument.
If you do not specify a name for the screenshot, the snapshot will be saved with the file name with a date stamp in your current directory - this, as we mentioned earlier, is the default behavior of the collection process.
This is an example of the command -e option, which scrot uses the default name for the screenshot:
scrot -e 'gthumb $ n'
Instructions for taking screenshots of Linux computers Picture 21
It is worth mentioning that $ n is a special string, providing access to the screenshot name. For more details on special sequences, go to the next section.
Special series:
The -e (or --exec) parameters and file names can use formatters when used with scrot. There are two types of parameter formats. The first type is the preceding character '%' used for date and time formats, and the second type is for internal filtering and the prefix is '$'
Some specifiers are identified by the --exec parameter and the file name below.
For example:
scrot ashu.jpg -e 'mv $ f ~ / Pictures / Scrot / ashish /'
Below is a sample photo:
Instructions for taking screenshots of Linux computers Picture 22
If you do not specify a file name, then the script will by default save the snapshot in a date stamped file format. This is the date stamp file format by default used in scrot:% yy-% mm-% dd-% hhmmss_ $ wx $ h_scrot.png
Instructions for taking screenshots of Linux computers Picture 23
scrot abc.jpg -e 'echo $ s'
Here is a sample photo:
Instructions for taking screenshots of Linux computers Picture 24
Similarly, you can use other special strings $ p, $ w, $ h, $ t, $$ and n to provide access to image pixel size, image width, and image height. , image format, $ symbol and grant new line access respectively. For example, you can use these strings in the same way as the $ s example we discussed above.
This utility is easy to install on Ubuntu systems, the use is also quite simple for beginners. Scrot also provides some advanced features like special strings that can be used by professionals. You can find out more in case you want to use them.
See more: