I upgraded my system from Ubuntu 20.04 LTS to 22.04 LTS recently. I want screenshots to be copied to the clipboard instead of saving them on my disk every time.
I got to know that there was an option "copy a screenshot area to clipboard" that was present in the previous versions (through this gnome-screenshot copy to clipboard shortcut). I want to know whether I can add that to my current system.
I had tried this solution but it didn't make any difference
Please help me in fixing this.
Install
flameshot
, which has a copy to clipboard function.Note: Use control-c, or double-left-click, to COPY
Note: The following screenshot (ignore the debian), is from
Ubuntu Software
. Install the apt/deb version, not the snap version.sudo apt update
sudo apt install flameshot
See https://github.com/flameshot-org/flameshot for more information.
The
-c
command to copy the screenshot to the clipboard has a weird bug that doesn't copy the image when using-a
to grab a selection. A way to fix this is to make the command save the screenshot by adding--file={/filepath/filename.png}
after the-a -c
(this will save the screenshot to the disk, but every time you take a screenshot the first screenshot will be replaced, so you'll not have lots of files on the disk like you wanted), and this fixes is some how. Save the full command to a keyboard shortcut (the command all together isgnome-screenshot -a -c --file={/filepath/filename.png}
) and hopefully it will work for you. I don't know why this fixes the bug but it definitely works so you can try that without installing Flamshot or any other alternativs. Good luck!