GNOME Bugzilla – Bug 523174
thumbnailer should follow freedesktop directory specs
Last modified: 2011-04-03 18:23:19 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:
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.
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.
(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] .
Closing as notabug. Please file a new bug if you convince people on the XDG mailing list to change the thumbnailing spec. - Mike
Michael : what's the problem with the spec ? Thumbnail seems to be the perfect example of cached data.
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
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.
Re-opening in light of the recent mailing list discussions.
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?
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
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.
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
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.
*** Bug 600665 has been marked as a duplicate of this bug. ***
Thumbnailing has been moved from deprecated libgnomeui to gnome-desktop. http://library.gnome.org/devel/gnome-desktop/stable/thumbnail.html
Patches in the other bug. Still need a spec update. *** This bug has been marked as a duplicate of bug 646508 ***