[basedir-spec] What exactly is $XDG_DATA_HOME for ?

thibaut bethune thibaut.bethune at gmail.com
Tue May 27 14:12:55 PDT 2008


Reading that article (Cleaning user preferences, keeping user data)
from Ploum at http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data,
i've discovered basedir-spec (see comment 8 below the article).

I thought that $XDG_CONFIG_HOME was for configuration files and that
$XDG_DATA_HOME was for data. For instance, in the particular case of
Transmission (a BitTorrent client http://www.transmissionbt.com/ )
which creates several folders in home directory :
    * $HOME/.transmission/cache/
    * $HOME/.transmission/gtk/
    * $HOME/.transmission/torrents/
    * $HOME/.transmission/stats.bench
and where $HOME/.transmission/torrents/ has information about files
currently downloaded, i thought these informations were date that
should be in $XDG_DATA_HOME.
But Transmission developer (Charle at
http://trac.transmissionbt.com/ticket/684 ) has understood (concerning
files in $HOME/.transmission/torrents/ ) that "the intention of
XDG_DATA_HOME vs XDG_CONFIG_HOME is that the former should only be
written to when installing software. That way the directory is
relatively constant, which makes backups easier for system
administrators. By contrast, XDG_CONFIG_HOME is where all the
frequently-changed or short-term files go. Given the short-term nature
of .torrent files, IMO they're a better fit for XDG_CONFIG_HOME. They
*definitely* aren't files written once when installing software."

It seems that specs are not 100% clear about that and developers can't
easily change their program to match these specs since it's hard to
know which file must go in $XDG_DATA_HOME and which files must go
$XDG_CONFIG_HOME. See http://bugzilla.gnome.org/show_bug.cgi?id=523057
ans specially http://bugzilla.gnome.org/show_bug.cgi?id=518585#c3,
http://bugzilla.gnome.org/show_bug.cgi?id=522848#c1 &
http://bugzilla.gnome.org/show_bug.cgi?id=523174#c3

1°) Could you help us concerning transmission and files in
$HOME/.transmission/torrents/ ?
2°) Maybe specs could be more precise or could have some exemples
about which files are supposed to go to $XDG_DATA_HOME and which
filesare supposed to go to $XDG_CONFIG_HOME ?

Thanks !


More information about the xdg mailing list