Change gnome-screenshot auto-save-directory in Ubuntu Gnome 14.04

13,453

Solution 1

Edit

after reading this article and this question it seems like in Ubuntu-Gnome 14.04 (gnome 3.10) the screenshots with Keyboard shortcuts eg:Print are handle by the shell (gnome-settings-daemon media-keys) saving the files to ~/Pictures and not by the gnome-screenshot application.

I have installed Ubuntu Gnome 14.04 to test it.

1) I set the auto-save-directory to /tmp:

  • gsettings set org.gnome.gnome-screenshot auto-save-directory '/tmp'

2) I disable the keyboard shortcut Print and I created a new one to run the gnome-screenshot command with the shortcut Ctrl+Alt+H . Then I pressed the new shortcut and the screenshot appears in the /tmp directory.

enter image description here

enter image description here

enter image description here

So, set the auto-save-directory value works for gnome-screenshot, but to solve this issue you can try to disable the default keyboard shortcuts for Screenshots and create new ones but running the gnome-screenshot command.

gnome-screenshots command examples:

Whole screen: gnome-screenshot
Grab a window: screen gnome-screenshot -w
Grab an area: screen gnome-screenshot -a
Send the grab to the clipboard: gnome-screenshot -c
Interactive: gnome-screenshot -i


You can set the directory with the dconf command.

Command line

In this example I'm going to set my Downloads directory.

dconf write /org/gnome/gnome-screenshot auto-save-directory \'/home/youruser/Downloads\'

Please put the full path to the folder... My case /home/virtual/Downloads

GUI with dconf-editor Install dconf-editor

enter image description here

Solution 2

Just install dconf-editor:

sudo apt-get install dconf-editor

Open dconf-editor and edit the auto-save-directory field (see screenshot below):

  • org > gnome > gnome-screenshot

screenshot

Share:
13,453

Related videos on Youtube

frozen-flame
Author by

frozen-flame

Updated on September 18, 2022

Comments

  • frozen-flame
    frozen-flame over 1 year

    Configuring with dconf or gconf as suggested in this post worded on Ubuntu Gnome 13.10 (I tried and succeeded). But does NOT work on Ubuntu Gnome 14.04.

    How to change auto-save-directory of gnome-screenshot on Ubuntu Gnome 14.04?

  • frozen-flame
    frozen-flame almost 10 years
    Thanks, but does not work for me.
  • Roman Raguet
    Roman Raguet almost 10 years
    @frozen-flame... if you run "gsettings get org.gnome.gnome-screenshot auto-save-directory". what is the result?
  • frozen-flame
    frozen-flame almost 10 years
    After gsettings set org.gnome.gnome-screenshot auto-save-directory /new/path, gsettings get org.gnome.gnome-screenshot auto-save-directory gives me /new/path. But when I take screenshot with Print Scr button, the picture still saves to the old path(~/Pictures).
  • Takkat
    Takkat almost 10 years
    @frozen-flame: also try a shot using shift-PrtScr to select an area (this is what I tested above for working)
  • Roman Raguet
    Roman Raguet almost 10 years
    @frozen-flame: Also you can check in the gnome-control-center > keyboard > shortcuts.. and see if you have a key to "Save a screenshot to Pictures" ... and disable it.
  • kanu
    kanu almost 10 years
    Same issue here. I tried settings both auto-save-director and last-save-directory. Independent which screenshot method I use it does not land in the select folder.
  • frozen-flame
    frozen-flame almost 10 years
    @RomanRaguet Not found.
  • Roman Raguet
    Roman Raguet almost 10 years
    @frozen-flame: you can check my edit to see if helps.
  • frozen-flame
    frozen-flame almost 10 years
    @RomanRaguet Great answer! A little bit inconvenient, but the problem solved. I just wonder if we can change the command binding of keyboard->screenshots from gnome-settings-daemon media-keys to gnome-screenshot?
  • frozen-flame
    frozen-flame almost 10 years
    @RomanRaguet Do you know where are the keyboard settings stored? A config file somewhere?
  • Roman Raguet
    Roman Raguet almost 10 years
    @frozen-flame: the keyboard setting are in the schema org.gnome.settings-daemon.plugins.media-keys . but i think you need to set a custom shortcut to trigger gnome-screenshot.
  • Roman Raguet
    Roman Raguet almost 10 years
    @frozen-flame: but you can disable the default print shortcut. and then create a new custom one to launch gnome-screeshot and assign the print key.
  • Josh
    Josh about 9 years
    Is there a way to change how it names the file?
  • leoperbo
    leoperbo almost 7 years
    "screen gnome-screenshot -w", "screen gnome-screenshot -a", didn't work for me, it worked with "gnome-screenshot -w", "gnome-screenshot -a".
  • RichieHH
    RichieHH over 6 years
    Yeah, that doesnt work with the printscreen screenshot.
  • OSdave
    OSdave over 6 years
    it does work for me (ubuntu 16.04)