On Thu, May 6, 2010 at 10:27 AM, Simon McVittie <[email protected]> wrote: > (Cc'ing the author of the specification in question: Waldo, could you clarify > whether I'm interpreting it correctly?) > > At the beginning of this thread, Sander Jansen <[email protected]> wrote: >> For my music manager I need to store a sqlite3 database file somewhere >> on disk. Which directory would be the most appropriate to use, the >> XDG_CONFIG_HOME or the XDG_DATA_HOME directory? > > On Thu, 06 May 2010 at 09:28:42 -0500, Sander Jansen wrote: >> The database is really >> a hybrid between config and data, so I think I agree that a local /var >> would be the best fit. I think I'm going to stick with XDG_CONFIG_HOME >> for now. > > I'm pretty sure this isn't configuration (preferences). Deleting preferences > is meant to return the app to an unconfigured state, but not destroy > user-entered data like this: > > On Thu, 06 May 2010 at 09:28:42 -0500, Sander Jansen wrote: >> In addition, users >> may change the data in the database without writing it back to the tag >> as well. > > so I'd put it in XDG_DATA_HOME, as Julien Danjou suggested. > > There seems to be some disagreement over what XDG_DATA_xxx is for, and > in particular whether it's "like /usr/share", "like /var/lib", or something > else entirely. > > My personal impression is it's a combination of "like /usr/share" and > "like /var/lib" - the system-wide part is in /usr/share because it isn't > edited, even by the system administrator, but the part in a user-specific > directory can be changed by that user. > > The basedir document itself describes XDG_DATA_HOME as "a single base > directory > relative to which user-specific data files should be written". I think > that sounds like a suitable place for databases... > > GNOME's interpretation of the XDG_foo directories is at > <http://live.gnome.org/GnomeGoals/XDGConfigFolders>. It references > <http://ploum.frimouvy.org/?207-modify-your-application-to-use-xdg-folders>, > which focuses on defining what preferences and cache are, then considers > everything else that's not an explicitly-saved document to be "data". > > KDE's interpretation is > <http://techbase.kde.org/KDE_System_Administration/XDG_Filesystem_Hierarchy>, > which says >> Data that applications store which are specific to a given user are >> to be stored in the XDG_DATA_HOME directory > [...] >> Configuration information should be stored in the XDG_CONFIG_HOME directory > > The freedesktop.org trash specification (which sounds like a user-specific > part of /var to me...) uses XDG_DATA_HOME, too. >
Ok. Looking at the competition (exaile, rhythmbox), they seems to be using XDG_DATA_HOME as well. So perhaps the XDG_DATA_HOME is a better place, especially if people want to wipe their config files. XDG_DATA_HOME seems more appropriate for things like games where you can download customizations (example: openttd where you can download new vehicles,scenery and scenarios). The question is whether you still want to add a XDG_VAR_HOME as well and tell all applications that use XDG_DATA_HOME they may need move their databases to XDG_VAR_HOME. Cheers, Sander -- "The sands of time were eroded by The river of constant change." _______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
