Are there any sort of configuration options for specifying the default save location for gnome-screenshot
, or is this hard-coded into the source code?
It used to be ~/Desktop
, which seems to have changed to ~/Pictures
(in 12.04).
The only possible solution I've seen is about Setting the default name (as it includes time stamp information now instead of simply 'Screenshot#'), but that solution doesn't really seem ideal to me.
Also, this post suggested that the last save location is remembered the next time you take a screenshot, but in my experience, this doesn't seem to be the case. And in any case, following on from that, that entry in gconf-editor
doesn't even seem to accurately reflect the last location, so more than likely an entry related to an older version of gnome-screenshot
.
For 12.04
Via GUI
From the command line, run the command
sudo apt-get install dconf-editor
Or click here to install from the Ubuntu Software Center:
Press Alt + F2 and type
dconf-editor
Go to
org
->gnome
->gnome-screenshot
At "auto-save-directory" type the desired directory in the following format:
file:///home/user/Desktop/
A tip for anyone who is using the configuration editor in unity: click on the arrow to the left the
org
text to expand it.Via Terminal
Simply run this command, replacing the path with your preferred directory.
For 18.04 and later
For those who wondering why is it still not working, this bug is considered as
RESOLVED WONTFIX
, here's the sauce.For the workaround, you can install an extension for this. Just turn on the switch, and go to your Tweak Tool, head over the Extensions tab, and find Screenshot locations.
Click over the gear icon, and place your desired place to save, prefixed with
file://
as it's protocol to save.This works too with symbolic link.
For 17.10 and later
Turns out it's not so straightforward while capturing a screenshot with the PrintScreen key in GNOME version 3.8 or later.
First you may try to set
~/Desktop
(for example) as the autosave directory forgnome-screenshot
following the steps below./org/gnome/gnome-screenshot/auto-save-directory
.file:///home/YOUR_USERNAME/Desktop
in the Custom value box.Alternatively, you may just run the following command in Terminal:
But even after doing this if you press PrintScreen, captured screenshots will be saved in
~\Pictures
on GNOME 3.8 or later (see this bug report).So as a workaround you may now add another custom keyboard shortcut for
gnome-screenshot
which will save captured screenshots to~/Desktop
. To do that follow the steps.gnome-screenshot
in the Command box.Then logout and login again. Now Super+PrintScreen should save the captured screenshot in
~/Desktop
.P.S. For convenience you may first change the shortcut for "Save a screenshot to Pictures" to something else like Super+PrintScreen or disable it completely and then assign PrintScreen to the custom shortcut you just created.
You can refine what type of screenshot you want by using following flags in the command box (
gnome-screenshot <FLAGS>
):-a
(for 'area') will let you select the area to take the screenshot of using your mouse;-w
(for 'window') will take a screenshot of the currently active window only (and not the whole screen);-b
will include window's border in the screenshot,-B
will not include the border,-p
(for 'pointer') will include the mouse pointer in the screenshot (won't have any effect with-a
obviously);-i
(for 'interactive') will let you set the options in a poping-up dialog.You can combine flags together: e.g.,
gnome-screenshot -wB
will take a screenshot of currently active window without its border.You can get the exhaustive list of available options/flags via
man gnome-screenshot
.For 12.04
It can be be configured in 12.04 for 'auto save' & when using gnome-screenshot itself,
gnome-screenshot --interactive
, where the last save directory is usedWhat does seem to always default to Pictures is from the keyboard bindings (bug or intended?
Earlier in 12.04 the screens from the keyboard bindings used
auto-save
, people complained & it was returned tointeractive
Both settings for
gnome-screenshot
are in gsettings &dconf-editor
For 18.04 and later
First disable the default screenshot shortcut from settings:
Create a custom keyboard shortcut in the settings:
Name it gnome-screenshot, put the command as gnome-screenshot as well
Shortcut value : enter the key [Print Screen]
Create a custom shortcut:
Now enter into
dconf-editor
(Install it if you do not have it yet). Go to: org → gnome → gnome-screenshot → auto-save-directory: Change the auto save directory's custom value to the one you want.Enter the custom path:
For 18.04 and later
Install the GNOME Shell extension Screenshot Locations by TimurKiyivinski. Kudos to him for packaging the changes that the GNOME-team developers didn't want to implement into an extension and thus making it really simple to work around the issue.
EDIT: You still need to change the default path using dconf editor, obviously.
In 12.04 (haven't looked in previous versions of Ubuntu because I never faced this problem) you have to set the auto-save-directory-setting to the desired location where you want your screenshots to be stored. By doing so every time you take screenshot it will automatically land there. I also prefer to use ~/Desktop and you are also not prompted to specify a destination like before. The only thing that indicates that you have taken a screenshot is a short flash of the screen. However I would love to know how to get the prompt back because I sometimes like to store screenshots in other folders than the default one and it would be overkill to either change the settings or move the image every time.
For Ubuntu 13.10 (Saucy Salamander)
Install
dconf-editor
Open it and go to: org → gnome → gnome-screenshot
At
auto-save-directory
type the desired directory in the following format:/home/user/Desktop/
P.S.: Do not put in this format
file:///...
For 21.10 and later
I tried the answer labelled as "For 18.04 and later". However, it did not work in my 21.10 installation. Luckily, after some trial and error, I found a workaround which is a simple modification to that one.
The basic workaround is not to use the Tweak tool as the Extensions does not seem to show. Instead, install the Screenshot Locations extension then go to your Gnome Installed Extensions page and then click on the configuration button for the Screenshot location extension and select the folder you want and voilà.
Here is a screenshot of the configuration window:
Because the default screenshot application always stores the screenshots below
$HOME/Pictures
and there is no apparent way to reconfigure that directory I wrote a combination ofsystemd
user units to monitor the directory$HOME/Pictures
. Whenever something in that directory changes, all files named$HOME/Pictures/"Screenshot from"*
are moved to the subdirectory$HOME/Pictures/Screenshots
.Here is what I did:
Create a file
/etc/systemd/user/screenshot-mover.path
:Create a file
/etc/systemd/user/screenshot-mover.service
:Then, for every user who wants this mechanism, issue:
Do not run these commands as root, but as your user.
What it does:
Whenever something in the path
$HOME/Pictures
changes, the unitscreenshot-mover.service
gets called and moves every file that matches$HOME/Pictures/"Screenshot from"*
to the subdirectory$HOME/Pictures/Screenshots
. I know it is a hack but this approach works for me since months and I just wanted to share it.