Here is one ugly workaround to replicate the old behaviour that lets you choose the folder to save the screenshot after capturing.
Step one
You'll need zenity
. If it's not installed, install it first by running
sudo apt install zenity
Then create a script, say text file named prtscr-chooser.sh
somewhere, say in your home directory. Add the following lines to the file:
#!/bin/bash
gnome-screenshot -f ~/temporary-screenshot &&
SCREENSHOT=$(zenity --file-selection --save --confirm-overwrite)
mv ~/temporary-screenshot "$SCREENSHOT" ||
rm ~/temporary-screenshot
(Put gnome-screenshot -a
in place of gnome-screenshot
in the second line to capture an area instead of the whole desktop)
Finally make the script executable (refer to this).
Step two
Assign the script to Print Screen:
- Open Settings > Devices > Keyboard.
- Unbind Print Screen, i.e. change or remove the shortcut for 'Save a screenshot to Pictures'.
- Scroll down to the bottom.
- Click the '+' symbol. A dialogue should pop up.
- Enter any name you like in the 'Name' box.
- Enter full path to the script in the 'Command' box, i.e. in this case enter
/home/YOUR-USERNAME/prtscr-chooser.sh
(your actual username in place of YOUR-USERNAME
).
- Click the 'Set Shortcut...' button and press Print Screen.
- Log out and log in again.
(You can follow the same method to assign the script the some other keyboard combination, e.g. Shift+Print Screen)
Now you should be getting a 'save as' dialogue which will let you choose the folder and name for the screenshot.
gnome-screenshot
. For some reason GNOME developers think all the users always want to save screenshots in the default folder! A command to capture an area isgnome-screenshot -a
, but if you run it, it will save the screenshot in the default folder without showing any prompt. – pomsky Nov 11 '17 at 13:20gnome-screenshot -a -c
lets you capture an area and copy the image to clipboard. – pomsky Nov 11 '17 at 13:26gnome-screenshot --interactive
command is very smart. That is the approach I am using on Ubuntu 20 now and I am very happy with this. I set the shortcuts PrintScreen and Shift+PrintScreen to this, so my older Ubuntu habits don't lead me astray. Or if you guys don't mind change, you can just use the default behavior where it saves to Home/Pictures or clipboard depending on keystroke. You can then find in recent and move it to where you want or if saved to clipboard, open Gimp (should install it on Ubuntu to edit images) and paste it as a new image. – Ultimater Sep 10 '21 at 09:30