It Seemed Like a Good Idea at the Time Coding, Mostly

18Jul/090

What the Hell, XDG?

Take a look at the XDG Base Directory Specification. It looks good, doesn't it? It really makes sense to have some "official" directories to store this kind of stuff in. Now look at the default locations listed:

$XDG_CONFIG_HOME - Looks like they nailed that pretty well. I might rather see some user-editable config files placed directly in '~/.app/', but '~/.config/app' is alright as a second choice.

$XDG_CACHE_HOME - Dead on. It is incredibly nice to have a single home for all those nasty little cache files that are a little too persistent to place in '/tmp'.

$XDG_DATA_HOME - Okay, it's a little bit ugly to store extra data in '~/.local/share', why couldn't they just put it in '~/.local'? But on the other hand, most applications don't even need extra data of that sort anyway, and it will rarely, if ever, be edited by a human, so it's at least a little bit acceptable.

$XDG_DATA_DIRS - Yeah, they're back on form for this one. Those two default directories cover basically every app in existence, so not a single fault can be found there.

$XDG_CONFIG_DIRS - WHAT THE FUCK! Why the hell do they decide every application needs to store their system-wide configuration in a special '/etc/xdg' directory? On my system, I count a grand total of three applications in there, of which I use one and have configured zero. For comparison, I count 157 files and directories in '/etc', other than '/etc/xdg'. Obviously, people will kind of expect to see their system-wide config files placed directly in '/etc'

What reason can there be for that kind of annoyance? When I have to go in and manually edit a system-wide config file, I will look for it in '/etc'. It would never even have occurred to me to look in '/etc/xdg'. At the very least, couldn't the default search path have been '/etc/xdg', followed by '/etc'?

This kind of trivial little issue weakens the entire specification, because such a seemingly inconsequential little rough edge can completely sour people's opinions of the whole document. And it would be a shame if that happened, because I would rather see the majority of these things become common convention.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.