After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 715038 - Screenshots are not saved anywhere when target directory does not exist.
Screenshots are not saved anywhere when target directory does not exist.
Status: RESOLVED OBSOLETE
Product: gnome-screenshot
Classification: Core
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: gnome-screenshot-maint
gnome-screenshot-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-22 20:27 UTC by Christian Gonzalez
Modified: 2021-05-25 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
strace log (170.21 KB, text/x-log)
2013-11-22 20:27 UTC, Christian Gonzalez
Details

Description Christian Gonzalez 2013-11-22 20:27:45 UTC
Created attachment 261268 [details]
strace log

Using Debian 7.2 up to date in a fresh install, the user has an empty home directory besides ~/Downloads.
Now if you press PrtScr, I see the screen flashing, but no image shows up in any directory I know of. A
 strace -o screenshot.log gnome-screenshot
produces the line:
 open("/home/christian/.cache/gnome-screenshot/scr-1873812072.png", O_RDONLY) = 10
(full file attached)

But the directory ~/.cache/gnome-screenshot is empty.
I tried to create a ~/Pictures dir, as stated in Bug, no difference

This IMHO is a severe bug as it renders gnome-screenshot unusable.
Comment 1 Christian Gonzalez 2013-11-22 20:29:45 UTC
Sry, forgot to link to "as stated in Bug 669629"
Comment 2 Emmanuele Bassi (:ebassi) 2015-08-17 14:49:53 UTC
(In reply to Christian Gonzalez from comment #0)
> Created attachment 261268 [details]
> strace log
> 
> Using Debian 7.2 up to date in a fresh install, the user has an empty home
> directory besides ~/Downloads.
> Now if you press PrtScr, I see the screen flashing, but no image shows up in
> any directory I know of. A
>  strace -o screenshot.log gnome-screenshot
> produces the line:
>  open("/home/christian/.cache/gnome-screenshot/scr-1873812072.png",
> O_RDONLY) = 10
> (full file attached)
> 
> But the directory ~/.cache/gnome-screenshot is empty.

That's where the file is temporarily saved in order to display it into the "Save" dialog. The XDG_CACHE_HOME/gnome-screenshot directory is created if it does not exist.

> I tried to create a ~/Pictures dir, as stated in Bug, no difference

You need the xdg-user-dirs package, to set up the XDG user directories, otherwise GLib won't know where the XDG_PICTURES_DIR is located. The fallback for missing directories is $HOME.
Comment 3 Christian Gonzalez 2015-08-17 22:52:15 UTC
Ok, even if it's temporarily saved there, as I said in the first place, there *is* no directory created by gnome-screenshot. The file just vanishes. And I *have* installed the xdg-user-dirs package.

And even if the package is not installed, as you said, there *must* be a fallback - save the picture in $HOME.

But that does not happen. There is no file saved.
Can I do anything to help fixing this?
Comment 4 André Klapper 2021-05-25 12:37:38 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/

Thank you for your understanding and your help.