Hacker News new | ask | show | jobs
by marcosdumay 272 days ago
> \s I guess we'll just need to create a brand new standard, that will make things better. \s

Linux has one single standard, all that software doing random stuff is non-standard.

And the standard says it's configurable, so I don't know what of your examples is the correct one on your machine.

1 comments

There is definitely not one single standard. If you look at the "Filesystem Hierarchy Standard" (LSB standard, which is not universal), on the section about the home directory, you can find this:

> A number of efforts have been made in the past to standardize the layout of home directories, including the XDG Base Directories specification [9] and the GLib conventions on user directory contents. [10] Additional efforts in this direction are possible in the future. To accomodate software which makes use of these specifications and conventions, distributions may create directory hierarchies which follow the specifications and conventions. Those directory hierarchies may be located underneath home directories.

So one standard saying you should look at other standards. XDG from freedesktop.org is the most popular (and probably the one you are referring to). However, it relate to Linux desktops, it says nothing about non-desktop applications (ex: bash, ssh, git, ...). About git, it would a bit ironic for git, made by Linus himself for working on the Linux kernel to not follow the "one standard".

Many standards refer to other standards. The XDG Base Directories specification is for any software on any Unix like OS. Git supports it. So does GLib. Bash and OpenSSH should. The GLib user directories are Desktop, Documents, and so on. The specifications do not conflict.
It looks like Git supports it since 2015 and Bash and OpenSSH apparently don't as neither contain the string "XDG_" in their binary.