Wednesday, 29 March 2023

Bring back the old gnome-screenshot back to Ubuntu 22.04

You know the new screenshot utility found in Ubuntu 22.04 is annoying right. I found a solution here. Thanks a million to this guy who provided this golden answer. 

This way, you can bring the old gnome-screenshot utility back. 

First, install gnome-screenshot
sudo apt install gnome-screenshot
Then, install xclip
sudo apt install xclip
Then, make a script file containing the following,
#!/bin/bash  
TMPFILE=`mktemp -u /tmp/screenshotclip.XXXXXXXX.png`  
gnome-screenshot -af $TMPFILE && xclip $TMPFILE -selection clipboard -target image/png; rm $TMPFILE || echo "" 
Then, go to keyboard shortcuts, and make a shortcut of your choice for the script. 

I chose the good ol' Ctrl + Shift + PrtScr

No comments:

Post a Comment