-1

Is there a command which can take a screenshot of a specific area of the desktop?

I use Ubuntu. Thanks for every answer.

AdminBee
  • 21,637
  • 21
  • 47
  • 71
Tim
  • 1
  • 4
    Does this answer your question? [How to do a print screen or capture an area of the screen](https://unix.stackexchange.com/questions/3728/how-to-do-a-print-screen-or-capture-an-area-of-the-screen) And https://unix.stackexchange.com/q/155352 – Quasímodo Mar 02 '21 at 10:27
  • Please define "specific". By absolute pixel co-ordinate, active windows/app, desktop/ work space or full screen? – M.N. Mar 02 '21 at 10:59

3 Answers3

2

You may use the import command.

More information on how to use it here

If the command is not available, you may install the imagemagick package to have it.

The usage is like the following:

import [options] output-file

in which the numerous different [options] can be detailed in the man page of import by using man import.

Here is an example:

import -screen test.png

allows you to have a cursor to select a section of your screen and save it in test.png

Another example is to save a whole window with its border by doing

import -border test2.png
Pat. ANDRIA
  • 133
  • 5
2

On any system using GNOME 3 (which I think includes the current releases of Ubuntu), the built-in screenshot function can take care of this: press ShiftPrint Screen, and you’ll get a selection cursor — drag that over the area you want to capture. The screenshot will be stored in a file in your default “Pictures” directory (the exact name will depend on your settings), and you’ll see it in your list of recently-used documents.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
0

I'm a giant fan of Shutter. As you're using Ubuntu, you can install it with:

sudo apt install shutter

You can then change your keyboard shortcuts (delete the existing shortcuts and add new ones) to work with Shutter.

To take a full screenshot, it's:

shutter -f

To take a screenshot of a specific area:

shutter -s

Now, why do I prefer it?

First, you can do basic editing with Shutter. You can crop, blur, add arrows, add text, and more. You can also upload (called "Export") directly from within Shutter. Not only does it have a few sites configured, you can also add your own sites to the upload function.

This might be a bit of overkill for some folks, but I find myself using those same features on a regular basis. Shutter is one of those apps that I have sitting in the system tray shortly after booting.

KGIII
  • 447
  • 1
  • 3
  • 9