1

Using the default screenshot provided with Ubuntu 18.04, any screenshot of all my screens, or specific windows will cause the image to be saved to $HOME.

By default, the dconf value for /org/gnome/gnome-screenshot/auto-save-directory is '', which seems to be the home directory. Changing the value to either of the following has no effect:

/home/user/Pictures
file:///home/user/Pictures/

Replacing user for $USER makes no difference, either.

Is there a way to work around this? Alternatively, is it possible to set a command line option to save images to a specific directory, like:

gnome-screenshot -save /path/to/save

If so, I can simply bind the print screen key as such. However, I saw no mention of such an option in the man page.

I've noticed some similar questions which are a few years old have stated there was some bug involving this. I'm not sure if the bug would have existed for that long, but I'd assume it would have been solved by now if that was the case.

Perhaps something else might be overwriting the setting? Or am I making a false assumption that gnome-screenshot is being used? I haven't installed any screenshot related packages though.

5
  • You've actually nudged me in the right direction. Wasn't the right solution for me, as it was a workaround, rather than a fix, but then I decided to try unbinding the default print screen entry and create my own. As per my answer, this seemed to work.
    – hiigaran
    Aug 8 '18 at 19:02
  • I don't see how it's a different answer, unbinding <PrtScr> and assigning it to a custom shortcut is also mentioned here (last sentence: "for convenience you may first change the shortcut for "Save a screenshot to Pictures" to something else like <Super>+<Print> and assign <Print> to the custom shortcut you just created.")
    – pomsky
    Aug 8 '18 at 19:06
  • Fair point. I'll go ahead and delete this question in a bit
    – hiigaran
    Aug 8 '18 at 19:09
  • Understood. Will do.
    – hiigaran
    Aug 8 '18 at 19:12
  • 1
    BTW for an alternative solution (for an answer to "is it possible to set a command line option to save images to a specific directory..." part), check this out. You can use a command to capture screenshots to a specific directory (and add date/time to the filename to avoid overwriting).
    – pomsky
    Aug 8 '18 at 19:20
0

As per the answer linked by pomsky (thanks) over here, the solution mentioned that due to a bug, the print screen button could not be used.

However, I was able to go to Settings > Devices > Keyboard and unbind the default screenshot buttons. I then created a custom bind for gnome-screenshot and gnome-screenshot -w as print screen and alt+print screen respectively, as they originally were.

Oddly enough, this solved the problem. The images now save to whatever I specified in the dconf editor.

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