How to Install Scrot on Linux Mint 20

Scrot is a minimalist command-line screen capturing application that uses imlib2 to grab and save images. It also allows substantial flexibility by specifying parameters on the command line terminal such as thumbnail generation, delay timers, quality of output, and much more.

In the following tutorial, you will learn how to install Scrot on Linux Mint 20 using the command line terminal, along with how to update remove the screenshot software and basic common commands to use with scrot in the terminal.

Update Linux Mint

The first step is to make sure your system is up-to-date to avoid issues during the installation and for good practice. This is done by opening your terminal and using the following command.

sudo apt update && sudo apt upgrade -y

Install Scrot

By default, Scrot is located in Linux Mint/Ubuntu repository making the installation quick and straightforward. In your terminal, use the following command to install Scrot as follows.

sudo apt install scrot -y

Scrot Terminal Commands

Now that you have installed the terminal command line screenshot software, below are some basic examples of commands that you may find helpful, but first, you should use the help command to get a complete list of options that you can utilize with this software.

scrot --help

Example output:

Usage : scrot [OPTIONS]... [FILE]
  Where FILE is the target file for the screenshot.
  If FILE is not specified, a date-stamped file will be dropped in the
  current directory.
  See man scrot for more details
  -h, --help                display this help and exit
  -v, --version             output version information and exit
  -a, --autoselect          non-interactively choose a rectangle of x,y,w,h
  -b, --border              When selecting a window, grab wm border too
  -c, --count               show a countdown before taking the shot
  -d, --delay NUM           wait NUM seconds before taking a shot
  -e, --exec APP            run APP on the resulting screenshot
  -q, --quality NUM         Image quality (1-100) high value means
                            high size, low compression. Default: 75.
                            For lossless compression formats, like png,
                            low quality means high compression.
  -m, --multidisp           For multiple heads, grab shot from each
                            and join them together.
  -s, --select              interactively choose a window or rectangle
                            with the mouse
  -u, --focused             use the currently focused window
  -t, --thumb NUM           generate thumbnail too. NUM is the percentage
                            of the original size for the thumbnail to be,
                            or the geometry in percent, e.g. 50x60 or 80x20.
  -z, --silent              Prevent beeping
  -p, --pointer             Capture the mouse pointer.
  -f, --freeze              Freeze the screen when the selection is used: --select
  -o, --overwrite           By default scrot does not overwrite the files, use this option to allow it.
  -l, --line                Indicates the style of the line when the selection is used: --select
                            See SELECTION STYLE
  -n, --note                Draw a text note.
                            See NOTE FORMAT

  Both the --exec and filename parameters can take format specifiers
  that are expanded by scrot when encountered.
  There are two types of format specifier. Characters preceded by a '%'
  are interpreted by strftime(2). See man strftime for examples.
  These options may be used to refer to the current date and time.
  The second kind are internal to scrot  and are prefixed by '$'
  The following specifiers are recognised:
                  $a hostname
                  $f image path/filename (ignored when used in the filename)
                  $m thumbnail path/filename
                  $n image name (ignored when used in the filename)
                  $s image size (bytes) (ignored when used in the filename)
                  $p image pixel size
                  $w image width
                  $h image height
                  $t image format (ignored when used in the filename)
                  $$  prints a literal '$'
                  \n prints a newline (ignored when used in the filename)
          scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/images/shots/'
          Creates a file called something like 2000-10-30_2560x1024_scrot.png
          and moves it to your images directory.

  When using --select you can indicate the style of the line with --line.
  The following specifiers are recognised:
                  style=(solid,dash),width=(range 1 to 8)
  The default style are:
          scrot --line style=dash,width=3 --select

  The following specifiers are recognised for the option --note
                  -f 'FontName/size'
                  -t 'text'
                  -x position (optional)
                  -y position (optional)
                  -c color(RGBA) (optional)
                  -a angle (optional)
          scrot --note "-f '/usr/share/fonts/TTF/DroidSans-Bold/40' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"

This program is free software see the file COPYING for licensing info.
Copyright Tom Gilbert 2000
Email bugs to <scrot_sucks@linuxbrit.co.uk>

Capture Screenshot of Desktop

Capture the current desktop and specify a filename. By default, all images are saved in the current working directory.

scrot {file-name}.jpg

Capture Working Window

Capture the current focus screen, such as a browser, application, etc.

scrot -u {file-name}.jpg

Alternatively, use the following for users who prefer having a border around the captured focused window.

scrot -ub {file-name}.jpg

Capture Screenshot to Specific Directory

For taking screenshots and then directing them to a specific location, use the following example and replace the directory path.

scrot /home/Pictures/{file-name}.jpg

Adjust Screenshot Quality

For adjusting the screenshot quality, specify between 1 (lowest quality) and 100 (highest quality).

scrot -q 75 {file-name}.jpg

Add delay to Capture Screenshot

Add a delay timer to the scrot command to delay x amount of seconds as follows.

scrot --delay 7 {file-name}.jpg

The 7 is the number of seconds, and replace it with any number you would like to use.

Add Countdown Delay Timer to Capture Screenshot

Similar to the previous command example, this will allow displaying a countdown.

scrot --delay 7 {file-name}.jpg -c

Capture Screenshot & Generated Thumbnail

For thumbnail generation, add --thumb then size as follows.

scrot --thumb 75 {file-name}.jpg

How to Update Scrot

Updates should be handled with your standard system updates when prompted. For those users that would like to check more regularly, use the following command in your terminal.

sudo apt upgrade && sudo apt upgrade

How to Remove (Uninstall) Scrot

To remove the software, run the following command.

sudo apt autoremove scrot --purge -y

Comments and Conclusion

In the guide, you have learned to install the Scrot on Linux Mint 20 LTS using the latest stable version from its official PPA.

If you’re looking for an easy-to-use, lightweight screen capturing application that also gives you a good amount of flexibility in terms of what you can do with your captured content, then scrot is worth checking out. It may not have all the bells and whistles of some other applications, but it gets the job done quickly and easily.

Follow LinuxCapable.com!

Like to get automatic updates? Follow us on one of our social media accounts!