[dev] Re: XDG directories

From: David Engster <deng_AT_randomsample.de>
Date: Fri, 11 Jun 2010 16:09:55 +0200

Dieter Plaetinck writes:
> On Fri, 11 Jun 2010 09:29:41 -0400
> Kris Maglione <maglione.k_AT_gmail.com> wrote:
>> On Fri, Jun 11, 2010 at 03:17:18PM +0200, David Engster wrote:
>> >David Engster writes:
>> >> I'm trying to understand which problem exactly is solved by this. I
>> >> tried to read the "XDG Base Directory Specification" [1] but I
>> >> admit I didn't get past "Basics". How is fiddling with
>> >> XDG_CACHE_HOME better than a dotfile or dot-directory in your
>> >> $HOME?
>> >
>> >OK, I've tried the next section.
>> >
>> >Can someone explain to me what XDG_DATA_HOME really is for? I know
>> >what the spec says ("directory relative to which user specific data
>> >files should be stored"), but then it doesn't make sense to me that
>> >its default is '~/.local/share'. Since XDG_DATA_DIRS default is
>> >'/usr/share:/usr/local/share', and data in XDG_DATA_HOME overrides
>> >those, it seems they want to mimic the share hierarchy locally? They
>> >somehow want to separate configuration from user data, but then they
>> >mix user data with application data? I don't get it.
>> Like I said, the spec is verging on batty as is. I still haven't
>> figured that out myself, and that's after searching the
>> directories on my computer and seeing what other apps've done.
>> My best guess on the matter is that .config should be more for
>> user-editable things, and .local/share for — other local crap, I
>> guess. Current apps don't really seem to discriminate.
> yes, both the app data and user data (can) end(s) up in $XDG_DATA_HOME

I see that in my .local/share as well. It's a complete mess.

So what they tried to do is to separate configuration settings from user
data. But then they took a quick look at other systems (like OS X) and
wanted the possibility to override/add application data (like fonts) in
a local share hierarchy. I guess they also wanted you to be able to
install software locally by using '--datadir=~/.local/share
--sysconfdir=~/.config'. Now you got somehow everything, and every
application will just do what it deems right, or only implements a
subset of the spec, so that when you really want to profit from such a
complicated setup, it probably won't work anyway.

> personally I don't mind the mixed nature of data in $XDG_DATA_HOME and
> as long as apps don't automatically update manually written files, it's
> all good for me.

The problem is that data is even more spread than it was before, and
often cannot be tracked anymore to the application which generated
it. So if you're worried about applications littering your $HOME with
dotfiles, you now have a littered .local/share and often do not even
know if you can delete that stuff.

Received on Fri Jun 11 2010 - 14:09:55 UTC

This archive was generated by hypermail 2.2.0 : Fri Jun 11 2010 - 14:12:02 UTC