6 ms·
Most Linux GUI apps either litter your home folder with dotfiles, dotfolders (both disgusting) or they follow XDG Base Directory specifications and place config
by ElectricalUnion 4y ago
Most Linux GUI apps either litter your home folder with dotfiles, dotfolders (both disgusting) or they follow XDG Base Directory specifications and place configurations in ${XDG_CONFIG_HOME:-${HOME}/.config}
- dklodh 4y agoMost don't even know of XDG. The reason is, there's no central documentation or route for the userland. By Linux, we understand, the kernel and to the kernel developers, that is true. So let alone the anarchy of the userland be handled by distributions and users.
- account42 4y agohttps://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/basedir-... freedesktop.org is that central documentation. Sure, there are applications that don't implemente that spec but it is not for there not being any documentation but either because the maintainers of those applications don't care or because the applications are older than the spec and moving configuration is not always trivial.
- tomcam 4y agoI don't mind dot files or dot folders, but I'm very open to better ideas. My app works on Mac, Linux, and Windows though. Any thoughts?
- ElectricalUnion 4y agoThere are several libraries that handle directory for you in the appropriate OS-specific manner. One Rust example being https://github.com/dirs-dev/dirs-rs https://github.com/dirs-dev/dirs-rs > The library provides the location of these directories by leveraging the mechanisms defined by > the XDG base directory and the XDG user directory specifications on Linux and Redox > the Known Folder API on Windows > the Standard Directories guidelines on macOS