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 523174 - thumbnailer should follow freedesktop directory specs
thumbnailer should follow freedesktop directory specs
Status: RESOLVED DUPLICATE of bug 646508
Product: gnome-desktop
Classification: Core
Component: general
2.22.x
Other All
: Normal normal
: future
Assigned To: Desktop Maintainers
Desktop Maintainers
: 600665 (view as bug list)
Depends on:
Blocks: 523057
 
 
Reported: 2008-03-18 13:58 UTC by Martin Meyer
Modified: 2011-04-03 18:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Martin Meyer 2008-03-18 13:58:31 UTC
Please describe the problem:
According to bug 518587 comment 3, libgnomeui is responsible for thumbnail creation. These thumbnails are created in ~/.thumbnails, but should be in $XDG_CACHE_DIR/thumbnails (or similar) in order to follow fd.o spec.

The following is a copy/paste from one of the other bugs in this "series":

Any user config should go in $XDG_CONFIG_HOME
Any user date should go to $XDG_DATA_HOME
Any cached stuffs should go to $XDG_CACHE_HOME

More infos : http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

The reason why I'm reporting this bug :
http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Christian Persch 2008-03-18 14:20:37 UTC
The thumbnail spec says to put them there, see:
http://people.freedesktop.org/~vuntz/thumbnail-spec-cache/directory.html

So you'll first have to get the thumbnail spec amended.
Comment 2 Martin Meyer 2008-03-18 16:09:06 UTC
Interesting! I had no idea they were specifically put there. So the questions to discuss next:

1) Does the thumbnail cache seem sufficiently like cache data to be placed in the $XDG_CACHE_DIR directory? (assuming I go to the effort of getting that spec changed)

2) Does it seem like a reasonable idea to make that change? Who else depends on that spec that might have to update their app?

3) How would I go about asking for a modification to that spec?

From http://standards.freedesktop.org/basedir-spec/latest/ar01s02.html

"There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME."

and

"There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory is defined by the environment variable $XDG_CACHE_HOME."

4) So are thumbnails data or cache?

--
I personally feel that the thumbnail spec should probably be modified specify the directory in terms of the basedir spec. I think the thumbnails constitute cached data (they're basically caches of small images), and there's not much reason for that cahce not to be subject to $XDG_CACHE_HOME IMO.
Comment 3 Christian Persch 2008-03-22 13:06:51 UTC
(In reply to comment #2)
> 3) How would I go about asking for a modification to that spec?

Initiate a discussion on the XDG mailing list [http://lists.freedesktop.org/mailman/listinfo/xdg] .
Comment 4 Michael Chudobiak 2008-04-17 12:42:41 UTC
Closing as notabug.

Please file a new bug if you convince people on the XDG mailing list to change the thumbnailing spec.

- Mike
Comment 5 Lionel Dricot 2008-04-17 12:54:42 UTC
Michael : what's the problem with the spec ? Thumbnail seems to be the perfect example of cached data.
Comment 6 Michael Chudobiak 2008-04-17 13:04:13 UTC
We have two conflicting specs, so for the time being we should use the existing more-specific one (http://people.freedesktop.org/~vuntz/thumbnail-spec-cache/).

That is what everybody is using for thumbnails (gnome, kde, others), so there is no point changing gnome's behavior unless the thumbnailing spec is changed.

To change the thumbnailing spec, you have to address it through the freedesktop mailing list.

- Mike
Comment 7 Martin Meyer 2008-04-17 13:33:58 UTC
I sent a post to the XDG list, but it was sent to the moderator b/c I didn't join the list before posting. I'm going to join and resend, it's been like 2 days now and it doesn't seem to have been forwarded on.
Comment 8 Michael Chudobiak 2008-04-17 15:39:03 UTC
Re-opening in light of the recent mailing list discussions.
Comment 9 Martin Meyer 2008-04-18 00:43:50 UTC
Here's a link to the thread archive for historical purposes:

http://lists.freedesktop.org/archives/xdg/2008-April/009471.html

The general consensus seem to be to change the spec. There were two questions they wanted answered:

1) What apps, if any, might hard-code the ~/.thumbnails path? I think this was just glib and libgnomeui, but I wanted to verify.

2) Where would the migration code be placed to move the current directory to the new location?
Comment 10 Michael Chudobiak 2008-04-18 13:09:06 UTC
Some files that would need updating:

glib/gio/glocalfileinfo.c
gnome-settings-daemon/plugins/housekeeping/gsd-housekeeping-manager.c
gnome-user-docs/gnome2-system-admin-guide
gnome-user-docs/gnome2-user-guide
gnome-user-docs/gnome2-accessibility-guide
gthumb/libgthumb/thumb-cache.c
gthumb/libgthumb/typedefs.h
gthumb/libgthumb/thumb-loader.c
gthumb/src/dlg-search.c
gvfs/daemon/gvfsbackend.c
libgnomeui/libgnomeui/gnome-thumbnail.c
nautilus/libnautilus-private/nautilus-thumbnails.c
sabayon/lib/config.py.in

- Mike
Comment 11 Sven Neumann 2008-04-18 19:29:24 UTC
It would be a bad idea to ignore the fact that GIMP implements the thumbnail spec and would have to be adjusted as well. Otherwise this will be a severe regression of the GIMP user experience on the GNOME desktop. I am willing to do the necessary changes for GIMP 2.6, but we absolutely need a well-defined migration behavior. It should take care of people updating GIMP but working with an older GNOME version and vice versa.
Comment 12 Michael Chudobiak 2008-04-18 20:07:32 UTC
Do you have a preferred approach Sven?

This relates to bug 517561 (trash migration - what's the policy on migrating things) and bug 528749 (add g_get_user_thumbnail_dir function).

- Mike
Comment 13 Christian Neumair 2008-05-19 22:20:13 UTC
I would like to propose that we combine this major implementation change with a change that has been proposed long ago:

Thumbnails should be stored per parent directory, this is more OS cache friendly. ATM we just put all of them into one directory.
Comment 14 A. Walton 2009-11-04 20:59:53 UTC
*** Bug 600665 has been marked as a duplicate of this bug. ***
Comment 15 André Klapper 2009-11-07 23:10:25 UTC
Thumbnailing has been moved from deprecated libgnomeui to gnome-desktop.
http://library.gnome.org/devel/gnome-desktop/stable/thumbnail.html
Comment 16 William Jon McCann 2011-04-03 18:23:19 UTC
Patches in the other bug.  Still need a spec update.

*** This bug has been marked as a duplicate of bug 646508 ***