21

I've just upgraded to Ubuntu 20.04 from 18.04. Gnome screenshot command does not work anymore. The command does not copy the screenshot to the clipboard.

gnome-screenshot -a -c

9 Answers9

12

After months of banging my head and fingers, it is like so:

Main behavior:
Prtscn => Saves Full screen to folder [default ~/Pictures]

Modifiers

  • +Ctrl => Saves to clipboard
  • +Alt => Saves current window
  • +Shift => Draws area to save

And all combinations. [except alt + shift which behaves like alt alone]

For Example:
Ctrl + Shift + Prtscn will let you select area and save it to clipboard

Adeerlike
  • 229
11

Please try with CTRL + Shift + PrintSc

In my case, the solution is in configuration > key combinations > search the command and update the key combination. Currently, I take a screenshot area with shift + PrintSc and it is working for me!

Zanna
  • 72,312
Omar Mrad
  • 127
10

I found a workaround in https://askubuntu.com/a/1212806/1074472

gnome-screenshot -acf /tmp/test && cat /tmp/test | xclip -i -selection clipboard -target image/png

You need to have xclip installed.

6

I think the issue has been there for a while. It is probably due to a bug in recent versions of gnome-setting-daemon, which clears data in clipboard when the app is closed. Thus, when the command gnome-screenshot -a -c runs and finishes, the screenshot is saved to clipboard and then cleared. That is the best guess for now.

For more information and updates, please refer to https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/66

4

My solution (Ubuntu 20.04.1) was to use only the first part of Faith Baltaci's answer:

gnome-screenshot -acf /tmp/test && cat /tmp/test

1

Why not try Ctrl + Alt + PrintScreen. This copies the image into the clipboard instead of saving it in Pictures.

UPDATE JANUARY, 2025 : The default shortcuts in Ubuntu 24.04 are:

  1. To take a screenshot and save it in the Pictures/Screenshots folder, use Shift + PrintScreen.
  2. To take a screenshot of a window and copy it to the clipboard, use Alt + PrintScreen.
  3. To take a screenshot interactively, just use PrintScreen.
  4. Recording a screencast can be done with Shift + Alt + Ctrl + R.
1

Ubuntu 22.04

shift + ctrl + alt + r opens Record a screencast interactiveley

go to Settings > Keyboard > Keyboard shortcuts > Screenshots

enter image description here

Amin
  • 119
0

On my Ubuntu 22.04, the Ctrl Shift + Prt Scr shortcut does not work if the Screenshot program is closed. This seems to be a bug, which didn't happen on my last Ubuntu 22.04 machine.

My solution was to start the Screenshot program (gnome-screenshot) on startup, by adding this command as a startup application:

gnome-screenshot --interactive

I leave the application running in the background and I can now use the shortcut again, for quick and easy screenshots to clipboard.

enter image description here

Jacket
  • 41
0

Updated on 29 March 2025

It works for me on Ubuntu 24.04.2 LTS using the following command:

sh -c 'gnome-screenshot -acf /tmp/tmp.png'

Note: you can use this command as a custom keyboard shortcut

enter image description here