I'm going to make a claim. """ Your process runs in a system following XDG if the environment variable XDG_CONFIG_DIRS is defined OR the folder /etc/xdg exists. """
Two things are essential to make that claim. The name of the folder uses the term `xdg`. This is different than the rules mentioning `/usr/share` or the folders at $HOME (e.g. $HOME/.config) in 2 aspects: 1, folders like `/usr/share` are not unique to systems following the XDG convention; 2, the folders at $HOME could not exists at first, and still be in a system following the conventions and so, the process could create those folders in the first place. A test like this (if the assumptions I made are valid) could be used by applications like Clojure (my current interest) to switch between supporting or not XDG. But first, I would like to verify that this claim makes sense to you. I would appreciate any feedback you can give me. El vie, 29 mar 2024 a la(s) 2:48 p.m., Jesús Gómez ([email protected]) escribió: > Hi. > > I understand that the XDG_* environment variables are options for the > users to customize their system, but the lack of them doesn't mean that the > system is not following XDG. > > I've been thinking about this, and the more I read the specifications, it > seems to me that "Systems" don't have that responsibility and it is just an > decision of the applications to follow the specifications or not. > > I'm thinking this because of the Clojure CLI tool. I've been discussing > about this with the maintainers and there are 2 options: > > 1. Or Clojure could detect that the system is following the XDG > specifications (even when no XDG environment variables are in place). > 2. Define a flag at any time (installation, execution, packaging, etc., I > think they will decide that part) for following these specs. > > I think the more probable path is the flag, and it corresponds with the > idea that the System doesn't have a responsibility to express whether it > follows or not the specifications; but still, given only curiosity, I would > still like to know if the Systems can publish that or if an application can > detect that. > > Thank you! >
