45

I use MATE as desktop viewer. How can I add a shortcut for taking a screenshot of a part of the windows and copy it to the clipboard? Basically what with gnome the command control-shift-stamp.

0

5 Answers 5

65

There are a set of keyboard shortcuts in Ubuntu specifically for screenshots.

Go to System Settings > Keyboard > Shortcuts > Screenshots. In my case it is Ctrl+Shift+Print_Screen

Keyboard Shortcuts

4
  • 4
    Could you provide a screenshot of this? (Or a little more detail?)
    – RolandiXor
    Mar 17, 2015 at 15:29
  • Just open settings, and into keyboard you find something like this: i.stack.imgur.com/z1xXQ.png Jun 7, 2016 at 14:09
  • 1
    "Copy a screenshot of an area to clipboard" has changed my life! My old workflow was to crop with GIMP. This is much better.
    – LondonRob
    Mar 22, 2018 at 14:06
  • 1
    outdated answer
    – marcdahan
    Apr 12, 2021 at 4:14
24

I found out the solution. First, open the shortcut dialog window and press add to add a new shortcut. Then paste this code:

gnome-screenshot -a -c

For other useful gnome-screenshot command, from the terminal: gnome-screenshot --help

2
  • 1
    It would be good for other readers, if you accept your own answer (see Can I answer my own question?). Mar 17, 2015 at 18:23
  • 1
    You have to do this manually starting in Gnome 41+ - what I'm finding is that occasionally my shortcut just stops working... but perhaps that's another issue to figure out.
    – Jmoney38
    Jul 7 at 19:38
14

For Gnome, copying portion of the screen to clipboard is Ctrl+Shift+PrtScrn.

0
1

It looks like they've recently removed this in the newest versions on GNOME, but you can reinstate it by combining some of the existing answers here, specifically:

  1. Go to Settings > Keyboard > View and Customize Shortcuts > Custom Shortcuts.

  2. Click the + and create a new shortcut with:
    Command gnome-screenshot -acf /tmp/gnome-screenshot-area
    Shortcut Shift + Ctrl + Print

Note: saving the screenshot to file is intentional (thanks @grabantot).

Another note: I switched back to Wayland, which seems to have broken this method.

Custom Shortcut

2
  • 1
    The screenshot doesn't appear in the clipboard. I believe this is due to some issue with gnome that it doesn't preserve the values in clipboard after the application that added the value exits or something like that. Had a similar issue with using xclip in scripts.
    – grabantot
    Jul 4 at 13:01
  • 2
    Found the solution here askubuntu.com/a/1212806/626636
    – grabantot
    Jul 7 at 20:58
0

I had some issues with getting the custom selection to copy to clipboard. What worked for me is: gnome-screenshot --area -c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.