I recently upgraded from Ubuntu 20.04 to 22.04. I have to change my screenshot directory from /home/<usr_dir>/Pictures/Screenshots
to another path. I could do this in Ubuntu 20.04, but I am not able to do it in 22.04.
How can I do this?
I recently upgraded from Ubuntu 20.04 to 22.04. I have to change my screenshot directory from /home/<usr_dir>/Pictures/Screenshots
to another path. I could do this in Ubuntu 20.04, but I am not able to do it in 22.04.
How can I do this?
I have just installed gnome-screenshot
on 22.04 LTS with:
sudo apt install gnome-screenshot
and there appears not to be any option to change the default directory from Home/Pictures/Screenshots
in this version of GNOME.
Using Terminal
However, selecting gnome-screenshot -h
in terminal provides a help file with this utility, from which can be seen that invoking the tool with -f, --file=filename
will save the file directly to the file specified.
So then the actual syntax (assuming you have a directory called screens
under Downloads
in your Home
directory) will be:
gnome-screenshot -f [myfile]
and that will save the screenshot to a file called [myfile]
in that directory. Change the filename to what you require, of course.
Doing this in a terminal holds no issue, since you can easily use terminal shortcuts to reverse search the terminal at the command line prompt. Specifically, you can find the earlier command using Ctrl+r and beginning to type any part of the command to present options, and then change the command as required. Another option would be to use ↑ to scroll back through earlier commands, but that might be a bit tedious.
This will of course capture the whole screen in the chosen directory, but there are other options which can be set, such as --area
, as you will see from the help file.
Use dconf-editor
An alternative method is to change the path of the autosave directory by using dconf-editor
.
dconf-editor
is not installed by default, so to install it open a terminal and run:
sudo apt install dconf-editor
You can then run the utility either from terminal with dconf-editor
or select the GUI directly from Show Applications.
Once in the editor, select apps
and then click Search "apps" folder and enter screenshot
in the search box. Then select /org/gnome/gnome-screenshot/
from the list presented.
The next step is to select auto-save-directory
and disable Use default value, after which you can then enter a custom value in the field provided.
Using the example above, enter /Home/Downloads/screens
(or the path of your choice) and save accordingly.
On entry to the utility and at the point of saving the image, you can override the defaults to any folder of your choice (or filename), which will be remembered the next time you use the tool.