Location of home trash dir (Re: Trash spec 0.2, technical questions)

Claes Holmerson claes at it-slav.net
Wed Sep 1 19:35:53 EEST 2004



On Wed, 1 Sep 2004, David Faure wrote:

> On Wednesday 01 September 2004 17:01, Claes Holmerson wrote:
> > Would it not make sense to define the trash directory relative to
> > $XDG_CACHE_HOME? Trash, as well as cached data, is something you normally
> > don't want to back up, and it is also something you might want to remove
> > when lacking space
> Yes but you wouldn't want an automated program to remove it without you
> explicitely asking for it. Unlike real "cache" data, there's no way to recreate
> the contents of the Trash can after wiping it out.
>
> > as well as to clean up your "history" for privacy
> > reasons and similar. I think it makes sense to put such things below a
> > common base directory.
> I'm not strictly opposed, but I'm just not sure this would be correct. Application's
> "throwable" data and user's "throwable" data are rather different things.

I agree that they are somewhat different, but in more ways similar. I also
agree that trashed files are not a kind of cached data, since they are not
re-creatable. However, I am firmly of the opinion that they are similar
enough to be placed below a common base directory that can be excluded in
backups, when migrating data to another computer or be deleted when space
is scarce.

A way to do that given the current wording of the XDG Base Directory spec
is to put it below $XDG_CACHE_HOME.  $XDG_CACHE_HOME defaults directly to
$HOME/.cache. However, since trash is not exactly cached data, perhaps
cached data can be changed to be below a directory that also the trash
directory can share, in order to keep the number of directories in $HOME
reasonable. Something like $XDG_VOLATILE_HOME/cache and
$XDG_VOLATILE_HOME/trash (ok perhaps not the best name but you get the
idea)

I think it is important to consider alternative use cases for the
directories that are specified for freedesktop.org. Apart from cache
files, what other kinds of data share similar properties as trash? Image
thumbnails? core files? log files? history files? recent files lists? They
are all of different nature, but share many properties as well.

Claes



More information about the xdg mailing list