1

How do I take a screenshot of restricted area with delay while sending the screenshot to clipboard? I would like to get the screenshot stored on the clipboard to be able to paste it afterwards.

gnome-screenshot -a -c works but gnome-screenshot -a -c --delay=2 does not work. It outputs the following: Conflicting options: --area and --delay should not be used at the same time.

In case it is not possible to do this with gnome-screenshot, what other alternatives are there out there?

Thanks

goahead97
  • 41
  • 1
  • 4
  • `Shutter` provider the facility of a delay when taking a screen shot - including submenus. You can download it from the Ubuntu Software Center. – graham Apr 09 '21 at 19:53
  • Does this answer your question? [Shutter snapshot tool to copy image to clipboard](https://askubuntu.com/questions/799588/shutter-snapshot-tool-to-copy-image-to-clipboard) – graham Apr 09 '21 at 19:58
  • `Flameshot` will do the job. There are three different versions in the Software store... deb, flatpak, and snap. – heynnema Apr 09 '21 at 20:24
  • I like shutter but, how can I make a keyboard shortcut to crop a restricted area with shutter? – goahead97 Apr 10 '21 at 10:13
  • Not sure what you mean by "restricted area". If you mean redacting content from the shot captured by `Shutter` there is a option in the edit section of Shutter to do that (but not in `Screenshot Tool` that I recall. – graham Apr 10 '21 at 11:03

2 Answers2

0

First take a delayed full screen shot, then crop the image. I use GIMP to crop.

Pierre ALBARÈDE
  • 486
  • 5
  • 19
0

Taking a delayed screenshot in gnome-screenshot is only possible for a full screen capture.

IF there is a need to automate the process, the command line screengrabber scrot can do this. It only outputs to a file, but in good linux tradition, you can subsequently use another tool, xclip, to place it on the clipboard.

scrot -s -d 4 -o image.png
xclip -sel c -t image/png -i image.png 

This will allow you to make a selection (s) and after a delay of 4 seconds (-d 4) write out to image.png, overwriting -o the file if already present. The second command will link the file to the clipboard (-sel c) as a MIME type image/png.

This could be wrapped in a script:

#!/bin/bash
TEMP=mktemp
scrot -s -d $1 -o $TEMP
xclip -sel c -t image/png -i $TEMP 

mktemp creates a file with a random name in the /tmp folder. That folder is automatically cleaned on the next reboot. $1 is the first argument to provide to the script. So if you call the script for example ss, then the command ss 4 would introduce a delay of 4 seconds.

vanadium
  • 82,909
  • 6
  • 116
  • 186