XDG_STATE_HOME

Steven Allen steven at stebalien.com
Mon Apr 10 22:00:50 UTC 2017


Actually, after reading that proposal, that's not exactly what I was
thinking. My complaint is that the current system mixes state (e.g.,
recentf, email, trash, etc.) with program data (icons, themes, fonts,
etc.) in XDG_DATA_HOME.

I ran across this issue because I need to store the spacemacs code,
spacemacs stat (recent file list, auto save files, etc.), and spacemacs
config (managed by the user). According to a strict reading of the spec,
the code could go in `XDG_CACHE_DIR` (it *can* be re-downloaded) but
that's mildly absurd (re-downloading/compiling is a non-trivial
operation). So, disregarding that option, I have a pigeonhole problem: I
have three things and two places to put them.

So, there really should be either:

1. A separate STATE dir for storing state:
    /usr/{share,lib} -> XDG_DATA_DIR
    /var/lib         -> XDG_STATE_DIR (`~/.local/state`)
2. A separate LIB dir for storing "code" and "shared" data:
    /usr/{share,lib} -> XDG_LIB_DIR

Some programs like python are solving this by putting program data in
`~/.local/lib` (option 2) but personally, I think option 1 is more
correct (and leaves icons, trash etc. where they are).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20170410/4b19739c/attachment.sig>


More information about the xdg mailing list