by keyist · 14y ago · 0 comments
It's easy to understand and requires only a marginal increase in effort/code.
It's not at all easy to understand, nor easy to implement, nor does it have any tangible advantages.
It's one of these superfluous pseudo-standards that do nothing but add needless clutter. But gladly nobody seems to be using it anyway, I see only one directory in my ~/.local: vlc.
The first benefit is that it removes clutters from your $HOME.
The second benefit is that you can now manage and backup your settings in a sane way.
* ~/.config contains config files (should not be lost, but if lost you can recreate them);
* ~/.local contains user data files (save them often, never lose them for they are not replaceable);
* ~/.cache contains cached information (can be tmpfs mounted, you can delete it any time you want, no loss in functionality, you just lose some optimization);
* ~/.run is for temporary system files (must be tmpfs mounted or it must be cleaned during at shutdown or power on).
Luckily most of the apps used on Linux systems now use it, you are probably using Mac OS X.
And for the backup-case: Whitelisting is usually a futile idea to begin with. Normally you'd prefer to backup the odd superfluous file rather than miss an important one.
Luckily most of the apps used on Linux systems now use it
Excuse me?
$ find ~ -maxdepth 1 -name ".*" | wc -l
228
$ find ~/.local | wc -l
4
$ uname
Linux $ find ~ -maxdepth 1 -name '.*' | wc -l
354
$ find ~/.local/ -maxdepth 1 | wc -l
3
$ find ~/.local/share -maxdepth 1 | wc -l
66
$ find ~/.config/ -maxdepth 1 | wc -l
108
$ find ~/.cache/ -maxdepth 1 | wc -l
803
$ uname
Linux
$ lsb_release -d
Description: Ubuntu 12.04 LTS % uname
Linux
% find ~/.local | wc -l
16824
% find ~ -maxdepth 1 -name ".*" | wc -l
279Invisible clutter? That's a strange concept.
But the rest of your point indeed makes sense. It still is easier and probably comment to backup the whole $HOME. But those points you can see as a benefit, though not obvious.
A standard that uses environment variables means programs don't have to provide extra options for this customization (I've seen -f,--file , -c,--config and other variants). It allows for common code (libraries that implement the spec).
If you poke around for feature requests for various open source programs, you'll find XDG basedir compliance come up occasionally (moreso for CLI utils). I wouldn't say "nobody seems to be using it"; quick scan of my folders includes Chromium, uzbl, htop. Git's next release will be compliant too.
What fraction of those requests are by XDG advocates?
I ask because every standard comes with folks insisting that it be followed. While those folks claim to represent the interests of users, those requests are different.
It definitely has tangible benefits as well -- it promotes the clear separation of app data and user configuration, and unclutters the home folder.
And as pointed out by other replies, ~/.local is not the only XDG data dir.
I'm curious, how do you find it not easy to implement?
cd: no such file or directory: /home/tammer/.local
% uname -s -r
Linux 3.4.7-1-ARCH
FreeBSD 9.0-RELEASE - No ~/.local, ~/.config
Linux 3.2.0-23 - No ~/.local, ~/.config
Linux 3.0.0-16 - No ~/.local, ~/.config
Linux 3.0.0-12 - No ~/.local, ~/.config
Honestly, I'd never even heard of this scheme before today.
PS Listing a kernel version does not really provide any information about your modern linux distro.
How about consistency?
find .local/ | wc -l
618
So I guess it depends on your Linux flavor. Mine is Ubuntu 12.04. [jlgreco@local] ~ % find ~/.config ~/.local | grep ssh | wc -l
0
So.. no.Emacs saves them under %USERPROFILE% - I have in there - .alice, .android, .easyhg, .eclipse, .gstreamer-0.10, .lighttable, .m2, .matplotlib, .... .VirtualBox, .zenmap
Also in "Application Data" - .emacs.d, .mc, .subversion
My point is - this system works somehow even under non-unixy systems.
Because it's simple.
What did not, and still does not, is to create them via Windows Explorer.
You can create them just fine from the command line, or via Windows APIs.
But the value not being set for me means implies to me that it not being set is pretty common. Thus it seems like supporting this standard is going to involve supporting a fall-back of whatever you would do otherwise.
So I don't see "easy" at all but rather extra BS. Sorry.
Also, for my 2c, you should consider updating your Intrepid install if you at all can. It hasn't been supported for over two years, so it hasn't seen any security updates in that time. The Ubuntu do-release-upgrade system is pretty easy and reliable.