
On Wed, Aug 22, 2018 at 04:11:42PM +0200, Marc Jeanmougin wrote:
Hi all,
Freedesktop has a few specifications and standards for interoperability of stuff ( https://www.freedesktop.org/wiki/Specifications/ ) , and I wanted to ask in particular about the base dir specification :
"How desktops should locate files, such as config files or application data files." ( https://specifications.freedesktop.org/basedir-spec/latest/ but in particular https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html )
It basically set rules as to where users should lookup stuff.
Currently on unix we put everything userspace in .config/inkscape (|$XDG_CONFIG_HOME|), even when some of it would more adequately be described as data (assets) and, according to the spec, be put in a share/ directory such as .local/share (|$XDG_DATA_HOME|) which is already the case for systemwide assets (assets are in /usr/(local/)share/, not in /etc/xdg/).
So, the first question is the following : Do we want
(1) to follow the XDG dir spec and keep themes/, ui/, keys/, icons/ and preferences (which can be described as user-specific things to customize the program behavior or appearance) in |$XDG_CONFIG_HOME| but put assets (symbols, templates, palettes, extensions) in |$XDG_DATA_HOME| ?
or
(2) keep everything in .config because it might be less confusing or simpler to explain
It's a good point we keep more in .config than is appropriate per the spec, and I'd like to see thought go into how we can move things around better. I suspect a lot of what's in .config should really go into .local/share. However, there's clearly a lot of interpretation from project to project about what goes where, so I don't think this is a super urgent problem; indeed it may be worth keeping the change until after 1.0 is out in order to avoid unnecessary bugs or weirdness (such as the one you point out below) and potentially invalidating existing documentation.
NB: On windows, it's the same place (%appdata%) but we can think about moving stuff to %localappdata%, wherever it is.
Also (maybe a more minor point, but what prompted me to lookup the spec in the first place) the "logical" place to put autosaves (not to be mixed up with crash saves) would be (in my opinion) |$XDG_CACHE_HOME| ("Where user-specific non-essential data should be written") but on windows that defaults to the absurd ~\Local Settings\Temporary Internet Files\ so I was thinking of using |$XDG_DATA_HOME |but if everything stays in .config (option 2) I'll put that there.
I would also guess .cache would be where autosaves are supposed to go; does the XDG spec not give more specific guidance on that type of file? Where does gimp or other apps like us put their autosaves?
Thanks for working on this, improving how autosaves are handled sounds like something users will expect for 1.0, so it's really good you're giving it attention.
Bryce