I don't think XDG base dir will ever be fully and universally adopted. It's been years (21 years to be exact). If it wasn't for Arch Linux getting hostile to programs that don't follow (like locking permissions of the root user directory), it probably wouldn't have grown as much as it has recently to what it is now because, honestly, the spec is not actively solving real problems people have. Most of the adoption is happening because people are getting cranky about their $HOME directory layout enough that they are annoying enough to bully maintainers into supporting it, but 99% of users don't give a damn if the program follows XDG base dir or not. It's just making the things arguably "cleaner" according to freedesktop from a spec that hasn't gained wide adoption over 20 years.
I, however, don't like the loosy goosy config/data/cache split like they have it and the implied intent because not everything falls into those buckets and then you don't know the behavior of some system thing (is Dameon going to wipe my cache? are users going to copy the config folder around? what gets backed up exactly?) There is no standard for how the folders are really treated in the spec. Intentionally vague but possibly vague in ways that will break things if people make assumptions.
It's like the /usr split from the root. or /usr/local from the root. Or /opt. Left overs from a bygone era that seem to stick around. Trying to create yet another.
I reluctantly support it in our product, but only when those ENVs are explicitly set, and I 100% ignore XDG's behavior and what it says should be the default on every linux system when it's not set because it's not what other UNIX variants like MacOS expect. Just enough to keep the Arch Linux zealots from flooding our bug tracker each week, literally demanding we adopt it when they account for less than 1% of users. It's hard enough with docs to let users know where to find their files from our product on their system because users don't know what XDG is all the time and XDG for most is not the established convention they expect already. Frankly, there is too much legacy with trying to move everyone over to this spec, especially when it isn't driving some real compelling value for anyone except for folks who want a pristine user directory.
Honestly, we should rethink it entirely and move to a container-based solution where our desktop apps can't escape their little jails (almost like snap apps). Maybe learn from NIX a bit. Admit defeat that will ever get every linux user app in the world to care and adopt XDG base dir (or even user dir). It's hard enough we are supporting Mac and Windows ports that don't follow this behavior. Get away from the UNIX permission model of running the programs under the user and run each program under it's own uid. It's now android works.
> the loosy goosy config/data/cache split like they have it and the implied intent because not everything falls into those buckets and then you don't know the behavior of some system thing (is Dameon going to wipe my cache? are users going to copy the config folder around? what gets backed up exactly?) There is no standard for how the folders are really treated in the spec. Intentionally vague but possibly vague in ways that will break things if people make assumptions.
Can't say I've ever had issues with this regard, either in my own programs or in other programs I use. It always seems clear cut to me which should be used when. Can you give any examples?
> Get away from the UNIX permission model of running the programs under the user and run each program under it's own uid. It's now android works.
I don't blame other people if they want stuff like that, but personally I feel too old for that and will be sticking with what I've got (including XDG directories, because I find them easy and aesthetically pleasing.) All the newfangled sandboxing and stateless stuff is too much for me to learn for only academic benifit; I've never been pwned because thus far I have had good judgment with what software to trust. Learning whole new systems that disrupt my established workflows because I'm meant to be paranoid of the programs I choose to run just doesn't seem like a good tradeoff for me, personally.
It would be like ripping down all the walls in my house to install fire proof barriers, when I've been living in this house for 20 years without a hint of fire. If the house were built like that when I got it, then great, but it wasn't so I'm just going to be careful with candles and replacing smoke alarm batteries.
- Arch Linux isn't some fringe operating system full of zealots, it's one of the most popular Linux distribution (it was the most commonly used Linux distribution in the Steam hardware survey in April 2024, beating out Ubuntu). I think many people like it precisely because it takes an opinionated stance on issues such as these.
- You characterize people who ask for these features (for example in bug tracker) as "bullying" maintainers - the fact that such requests are common should show you how widespread support is for these ideas. It seems odd to procure feedback about what users want and then say, "well, that's not what they really want, it must just be a vocal minority".
- Directories like /use/local and /opt are not vestigial, they serve specific purposes. I don't think it's fair to call them a "holdover". For example, without /usr/local, how do you separate software compiled and installed by the user vs. from a package manager?
- I agree completely that containerization of apps is the future.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=259356