106

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.

10 Answers 10

143

Via GUI

  1. Install dconf-editor

    • From the command line, run the command sudo apt-get install dconf-editor
    • Or click here to install from the Ubuntu Software Center:

      Install via the software center

  2. Press Alt + F2 and type dconf-editor

  3. Go to org -> gnome -> gnome-screenshot

  4. At "auto-save-directory" type the desired directory in the following format: file:///home/user/Desktop/

    name: auto-save-directory, value: file:///full/path/

    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.

gsettings set org.gnome.gnome-screenshot auto-save-directory "file:///home/$USER/Downloads/"
  • 2
    it works without using files:// in ubuntu 14.04. Clrl+L will tell you the location . '/home/userName/location' – diEcho Oct 30 '14 at 13:46
  • 8
    Be aware that Gnome 3.8 doesn't use gnome-screenshot when using keyboard commands. – Andy May 13 '16 at 8:15
  • 2
    Not files:// but file:// – Reinier Post Aug 23 '16 at 20:43
  • 11
    Terminal method should be listed first since it's simpler. – dinosaur Jan 12 '17 at 21:37
  • 2
    The Terminal gsettings method does not work on Ubuntu 18.04. There was no error or warning and screenshot still went to the default ~/Pictures/. dconf-edit doesn't work either! The auto-save-directory showed ~/Downloads/ but was ignored. All screenshots went to ~/Pictures/ – SYK Aug 14 '18 at 20:57
17

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 used

What 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 to interactive

Both settings for gnome-screenshot are in gsettings & dconf-editor

enter image description here

  • Oh right. It does use that last save directory setting when using interactive, but introduces an additional dialog for what you want to grab - I guess this is the best I'll get. Thanks :-) – trent Mar 20 '12 at 22:13
  • 1
    How do you set the called argument ` --interactive` when pressing CTRL Print? – rubo77 Jan 4 '16 at 22:37
8

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.

Tweak tool screenshot SS

Click over the gear icon, and place your desired place to save, prefixed with file:// as it's protocol to save.

Settings SS

This works too with symbolic link.

2

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.

  • Where are you setting the auto-save-directory ? – fabricator4 Dec 12 '12 at 19:49
  • Look at @doug's comment above my answer. In the picture of the configuration editor in the section of gnome-screenshot the first setting is auto-save-directory. Just write there the location of the desired folder (Desktop for example) and you're ready to go. :) In his example it is set to "Documents". – rbaleksandar Dec 14 '12 at 16:50
2

In 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/

ps. Do not put in this format "file:///..."

  • 1
    Why is the "file:///..." format unacceptable? Just curious, I prefer the /home/user version better anyway. – Stratus3D Apr 23 '16 at 19:18
  • the file:/// format seems to work fine for me – Zoey Hewll Nov 19 '17 at 12:43
1

If the above answers do not work, Try this:

First disable the default screenshot shortcut from settings: Disable default screenshot shortcut

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:

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: Enter the custom path

0

You can set the default save directory of screenshots in CompizConfig Settings Manager.
Launch it, choose Screenshot under the Extras category. You can then choose the default directory you wish to use.

enter image description here

  • Yeah, thanks - I do use this when wanting to grab a specific screen area. More interested about being able to set the path for gnome-screenshot. – trent Mar 21 '12 at 0:04
  • 1
    For a specific area you can press SHIFT and PrtSc. – thonixx Sep 21 '12 at 7:51
  • Strangely, this option did not work for me. – Gabriel Sep 22 '12 at 0:39
  • Unity is dead now. – secretAgent May 20 at 16:44
0

If you can't/wan't install dconf-editor or any other software, simply open, or create if it doesn't exist, this file, with your preferred text editor:

~/.bash_aliases

Add this line, that create a permanent alias gss (you can choose another alias name):

alias gss='gsettings set org.gnome.gnome-screenshot auto-save-directory "$(echo $PWD)"'

then every time you need to save several screenshots in a specific and different path simply one a terminal in that path and execute:

gss

from now on every time you press the gnome-screenshot keyboard shortcut you will be prompted or you will check for the screenshot image file in that path.

0

This answer is based on this answer

As I wanted to use custom shortcuts in addition to custom screenshots location, I wanted to do this manually in terminal.

(1) I have created gshort Bash function based on this answer. Of course, you can do it in Perl or manually, but I too lazy to issue all the commands manually whenever I want to create a new shortcut. … Anyway, if you use this function, you need to save it to file, source that file (source path/filename.sh).

(2) And then issue these commands:

# Disable these 6 default shortcuts
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot ''
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot-clip ''
gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot ''
gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip ''
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip ''
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot ''

# Create new custom shortcuts
gshort "Screenshot of area" 'gnome-screenshot -a' "<Shift>Print"
gshort "Screenshot clip of area" 'gnome-screenshot -a -c' "<Primary><Shift>Print"
gshort "Screenshot" 'gnome-screenshot' "Print"
gshort "Screenshot clip" 'gnome-screenshot -c' "<Primary>Print"
gshort "Screenshot clip of area" 'gnome-screenshot -a -c' "<Primary><Shift>Print"
gshort "Screenshot clip of window" 'gnome-screenshot -w -c' "<Primary><Alt>Print"

(3) Note that the syntax of gshort is gshort "Name" "command" "shortcut": - name can be anything you wish; - command can be any command you wish; - shortcut can be any keybord shortcut you wish.

(4) Here is the list of some control key names that you need to use in shortcut:

  • Ctrl : <Primary>;
  • Alt : <Alt>;
  • Shift : <Shift>;
  • Super/Win: <Super>;
-3

For those who can't install dconf-editor and are terminal users, I would suggest to edit the .bashrc file in your home directory. Put anywhere in the file the line "mv ~/Pictures/Screenshot* ---put-here-desired-path---". The only problem with this method is that, in case you have a file starting with the string "Screenshot", it will be moved to the desired path you've put above.

  • 7
    What a dreadful idea. – Ken Sharp Feb 27 '16 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.