Science and technology

Scrot: Linux command-line display screen grabs made easy

There are nice instruments on the Linux desktop for taking display screen captures, resembling KSnapshot and Shutter. Even the straightforward utility that comes with the GNOME desktop does a reasonably good job of capturing screens. But what in the event you not often must take display screen captures? Or you utilize a Linux distribution with out a built-in seize device, or an older pc with restricted assets?

Turn to the command line and a little bit utility known as Scrot. It does a superb job of taking easy display screen captures, and it features a few options which may shock you.

Getting began with Scrot

Many Linux distributions include Scrot already put in—to verify, kind which scrot. If it is not there, you may set up Scrot utilizing your distro’s bundle supervisor. If you are keen to compile the code, seize it from GitHub.

To take a display screen seize, crack open a terminal window and sort scrot [filename], the place [filename] is the title of file to which you wish to save the picture (for instance, desktop.png). If you do not embody a reputation for the file, Scrot will create one for you, resembling 2017-09-24-185009_1687x938_scrot.png. (That filename is not as descriptive it may very well be, is it? That’s why it is higher so as to add one to the command.)

Running Scrot with no choices takes a display screen seize of your whole desktop. If you do not wish to try this, Scrot permits you to give attention to smaller parts of your display screen.

Taking a display screen seize of a single window

Tell Scrot to take a display screen seize of a single window by typing scrot -u [filename].

The -u choice tells Scrot to seize the window presently in focus. That’s normally the terminal window you are working in, which could not be the one you need.

To seize one other window in your desktop, kind scrot -s [filename].

The -s choice permits you to do one among two issues:

  • choose an open window, or
  • draw a rectangle round a window or a portion of a window to seize it.

You may set a delay, which supplies you a little bit extra time to pick out the window you wish to seize. To try this, kind scrot -u -d [num] [filename].

The -d choice tells Scrot to attend earlier than grabbing the window, and [num] is the variety of seconds to attend. Specifying -d 5 (wait 5 seconds) ought to offer you sufficient time to decide on a window.

More helpful choices

Scrot affords quite a few further options (most of which I by no means use). The ones I discover most helpful embody:

  • -b additionally grabs the window’s border
  • -t grabs a window and creates a thumbnail of it. This may be helpful while you’re posting display screen captures on-line.
  • -c creates a countdown in your terminal while you use the -d choice.

To study Scrot’s different choices, try the its documentation by typing man scrot in a terminal window, or read it online. Then begin snapping pictures of your display screen.

It’s fundamental, however Scrot will get the job finished properly.

Most Popular

To Top