Attached: 1 image
My fellow software engineer,
It's the year 2024.
Please store your #Linux #desktop application configurations ONLY in `$XDG_CONFIG_HOME`.
NOT in `$HOME` or other non-standard or obsolete places.
May #FreeDesktop be your guide.
https://www.freedesktop.org/wiki/Specifications/
#Programming #DevOps #SysAdmin
For me personally I just hate that I do not know where to find configs, especially when using a dotfiles repo, it becomes harder than if they’re all available under a common path.
Better organization and backup / restore. For example if you want to restore config files but don’t want to move over the large “.local” folder, applications that write to $HOME will create diifculty.
freedesktop.org produces specifications for interoperability, but we are not an official standards body. There is no requirement for projects to implement all of these specifications, nor certification.
Below are some of the specifications we have produced, many under the banner of ‘XDG’, which stands for the Cross-Desktop Group.
Its nit-picking, but this is a specification, i.e a preference, not an official standard. It would be great if everyone would agree on just one of these to use, but that isn’t a foregone conclusion. Even the actual standard, the FHS, isn’t followed by popular OS’s like NixOS.
False on at least Fedora Atomic[1], NixOS[2] and openSUSE Aeon[3]…
Which ‘immutable’ distros are you referring to?
On Fedora Atomic, changing /etc is literally identical to how it goes any other distro; or at least 1-to-1 as on traditional Fedora. The bonus is that a pristine copy of the original /etc is kept inside a sub-directory of /usr. Furthermore, all changes compared to the pristine copy are kept track of.
On NixOS, changes have to be applied through configuration.nix. Though, regardless, it’s effectively possible to edit and populate /etc like it is on other distros.
It’s explicitly mentioned that /etc does not belong to the immutable base.
No sorry, Fedora Atomic has allowed changes to /etc since at least 2019. Regarding NixOS, the consensus is that it’s an immutable distro. The immutability of /nix/store/ suffices for this.
Your notion on Fedora Atomic was false. So, what other ‘immutable’ distro did you have in mind when making that comment?
Thank you for your honesty! I only intend for the truth to prevail and/or to reach mutual understanding. So please don’t feel attacked. If somehow I came off as such, my apologies; that has never been my intent.
I can only imagine someone asking this if they a) don’t use the terminal except if Stackexchange says they should and b) have yet to try and cleanup a system that’s acquired cruft over a few years. If you don’t care about it, then let me flip that around and ask why you care if people use XDG? The people who care about it are the people in the spaces that concern it.
Off the top of my head this matters because:
it’s less clutter, especially if you’re browsing your system from terminal
it’s a single, specified place for user specific configs, session cache, application assets, etc. Why wouldn’t such important foundational things required for running apps not be in a well defined specification? Why just dump it gracelessly in the user’s root folder outside of pure sloppy laziness?
it makes uninstalling apps easier
it makes maintenance easier
it makes installing on new machines easier
It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.
Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.
It may actually be the best now, but so were the 14 others that came before it. Your stated reasons are the same reasons as everyone agreeing to use any other standard. Consistency, predictability, automation,ease of backup/restore, etc.
What sets this standard apart from all the rest? Based on their own description, they aren’t even an official standard, just one in “very active” use.
So why this, specifically? Just because its what you’re already doing?
Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.
This is true, and something that I’m working on. For some reason my brain is uncharitable in these situations and I interpret it not as a simple question but a sarcastically hostile put down in the form of a question. In this case, “Why would you be dumb and not just put things in /home”. That really is a silly interpretation of the OP question, so I apologize.
As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.
Sure, but the OP was essentially asking “Why isn’t dumping everything into a user’s /home the standard? Why are you advocating for something different?”
Based on their own description, they aren’t even an official standard, just one in “very active” use.
There are a LOT of “unofficial standards” that are very impactful. System D can be considered among those. The page you link to does talk about a lot of specifications, but it also says that a lot of them are already under the XDG specification or the reason for XDG is to bring such a scheme under a single specification, i.e. XDG.
So why this, specifically? Just because its what you’re already doing?
yes I do use it, so I am definitely biased in that regard
it bring a bunch of disparate mostly abandoned specification into a single, active one
it’s the active specification that has learned from past attempts
It’s weird to me that you think I think that. I do primarily browse files by terminal, but not always. Before I got into heavy terminal use I was a power user of Nemo. In any case, dumping everything in /home does not make for a better gui file browsing experience, either
The implication seemed to be “if you don’t care exactly where all your files are you must not use terminal”. Which I still don’t get. Just about anyone who would even be in a community like this uses terminal a lot anyway.
To give one example, what if someone wants to have more than one set of options for the same app? That’s something I’ve needed before, and it’s really hard to accomplish if the app always looks in one specific place for its options.
Oh so it makes it impossible to change config path? Yea that’s a bit inconvenient but you always can just make many files and replace the file in the right directory with the one you want.
Not if you want to use both at the same time. Due example, I’ve wanted to have a local Gnome session that I leave signed in, and another session with different settings that I remote into.
But what’s the difference? It’ll be in /home anyways and I heard BSD had some issues with something that could be XDG.
For me personally I just hate that I do not know where to find configs, especially when using a dotfiles repo, it becomes harder than if they’re all available under a common path.
Better organization and backup / restore. For example if you want to restore config files but don’t want to move over the large “.local” folder, applications that write to $HOME will create diifculty.
Because, like /etc, you know there is a designated place for config files. It’s already set for you right there, and there is a standard for it.
/etc is a standard, defined in the filesystem hierarchy standard. This is not:
Its nit-picking, but this is a specification, i.e a preference, not an official standard. It would be great if everyone would agree on just one of these to use, but that isn’t a foregone conclusion. Even the actual standard, the FHS, isn’t followed by popular OS’s like NixOS.
Specification, WHATEVER 🙄
The point is it exists for a reason, and clear purpose.
All specifications exist for a reason, and they all have a clear purpose.
What happens when you have 15 that are different and all overlap? When any of 15 is “right?”
/etc can’t be edited on immutable distros and usually apps store the editable config in /home/config and make the /etc one kind of read-only.
False on at least Fedora Atomic[1], NixOS[2] and openSUSE Aeon[3]…
Which ‘immutable’ distros are you referring to?
/etc
is literally identical to how it goes any other distro; or at least 1-to-1 as on traditional Fedora. The bonus is that a pristine copy of the original/etc
is kept inside a sub-directory of/usr
. Furthermore, all changes compared to the pristine copy are kept track of.configuration.nix
. Though, regardless, it’s effectively possible to edit and populate/etc
like it is on other distros./etc
does not belong to the immutable base.Fedora Atomic allowed it recently afaik. I’m always forgetting this. And NixOS is not immutable because of R/W FS.
No sorry, Fedora Atomic has allowed changes to
/etc
since at least 2019. Regarding NixOS, the consensus is that it’s an immutable distro. The immutability of/nix/store/
suffices for this.Your notion on Fedora Atomic was false. So, what other ‘immutable’ distro did you have in mind when making that comment?
Please stop harassing me. And idk. I saw that issue but at this point I think it was just misinformation.
Thank you for your honesty! I only intend for the truth to prevail and/or to reach mutual understanding. So please don’t feel attacked. If somehow I came off as such, my apologies; that has never been my intent.
In this case it would be
XDG_CONFIG_HOME=/home/config
. That simple.I can only imagine someone asking this if they a) don’t use the terminal except if Stackexchange says they should and b) have yet to try and cleanup a system that’s acquired cruft over a few years. If you don’t care about it, then let me flip that around and ask why you care if people use XDG? The people who care about it are the people in the spaces that concern it.
Off the top of my head this matters because:
🙄
Someone asking a question doesnt merit the insult of saying they “would never ask if they used a terminal.” I have no particular dog in this fight, but not being a dick isn’t that hard.
As to using this standard, just because this is your preferred standard, doesnt mean its the only standard.
It may actually be the best now, but so were the 14 others that came before it. Your stated reasons are the same reasons as everyone agreeing to use any other standard. Consistency, predictability, automation,ease of backup/restore, etc.
What sets this standard apart from all the rest? Based on their own description, they aren’t even an official standard, just one in “very active” use.
So why this, specifically? Just because its what you’re already doing?
This is true, and something that I’m working on. For some reason my brain is uncharitable in these situations and I interpret it not as a simple question but a sarcastically hostile put down in the form of a question. In this case, “Why would you be dumb and not just put things in /home”. That really is a silly interpretation of the OP question, so I apologize.
Sure, but the OP was essentially asking “Why isn’t dumping everything into a user’s /home the standard? Why are you advocating for something different?”
There are a LOT of “unofficial standards” that are very impactful. System D can be considered among those. The page you link to does talk about a lot of specifications, but it also says that a lot of them are already under the XDG specification or the reason for XDG is to bring such a scheme under a single specification, i.e. XDG.
Weird to me that you apparently think the only way of viewing files is in a terminal
It’s weird to me that you think I think that. I do primarily browse files by terminal, but not always. Before I got into heavy terminal use I was a power user of Nemo. In any case, dumping everything in /home does not make for a better gui file browsing experience, either
The implication seemed to be “if you don’t care exactly where all your files are you must not use terminal”. Which I still don’t get. Just about anyone who would even be in a community like this uses terminal a lot anyway.
To give one example, what if someone wants to have more than one set of options for the same app? That’s something I’ve needed before, and it’s really hard to accomplish if the app always looks in one specific place for its options.
Oh so it makes it impossible to change config path? Yea that’s a bit inconvenient but you always can just make many files and replace the file in the right directory with the one you want.
Not if you want to use both at the same time. Due example, I’ve wanted to have a local Gnome session that I leave signed in, and another session with different settings that I remote into.