3 ms·
Unrelated but is there a standard that keeps my ~/ home directory clean? I don't want billion apps to write ~/.foo_software_config to my home dir. It is a compl
by systemvoltage 5y ago
Unrelated but is there a standard that keeps my ~/ home directory clean? I don't want billion apps to write ~/.foo_software_config to my home dir. It is a complete mess.
- loeg 5y agoNowadays well-behaved apps tend to use a single file or directory under ~/.config/. I believe it is a FreeDesktop.org standard: https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html https://specifications.freedesktop.org/basedir-spec/latest/a...
- ziml77 5y agoAnd on Windows that has just made the mess even worse. Applications writing to %USERPROFILE%\Documents, %APPDATA%, %LOCALAPPDATA%, %USERPROFILE%, and %USERPROFILE%\.config Every language needs something like this library as part of the standard library https://pypi.org/project/appdirs/ https://pypi.org/project/appdirs/ It would at least make it a little more likely that files end up where they should.
- sneak 5y agoXDG I believe is the name of the standard. https://wiki.debian.org/XDGBaseDirectorySpecification https://wiki.debian.org/XDGBaseDirectorySpecification
- cturtle 5y agoYep, the XDG Base Directory specification [0]. Specifically the $XDG_CONFIG_HOME variable. [0]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/basedir-...
- samesamebutsame 5y agoThe few things I have written always have the configs in here, seems like the polite thing to do without cluttering up home for the end user, but I can't help laugh when I look my own system and apps are storing gigabytes of data in there. It's not really a config folder anymore, more a misused general store for files.
- cturtle 5y agoYeah, if an app were truly compliant it would store caches in $XDG_CACHE_HOME and data (icons, packages, sounds, images, level data, etc. required for behavior) in $XDG_DATA_HOME. It's unfortunate that not all apps follow it
- account42 5y ago$XDG_CACHE_HOME makes sense as having a directory that you can just blow away without fear but the $XDG_DATA_HOME / $XDG_CONFIG_HOME split, while not entirely unjustified, causes more problems than it solves because a) it is not always clear what is data and what is config, b) peeople disagree on what is data and what is config and c) other operating systems don't make this distinction for application files so ported software is almost guaranteed to just pick one and call it a day - so in practice you have both config and other data spread between ~/.local/share and ~/.config.
- heavyset_go 5y agoThat's a standard that apps need to adhere to. It doesn't stop apps from polluting $HOME[1]. [1] https://news.ycombinator.com/item?id=30379890 https://news.ycombinator.com/item?id=30379890
- account42 5y agoAll standards are by definition something that needs to be adhered to and don't magically stop anything. If you want to force uncooperative programs to behave there are different tools for that.