ATMO the XDG standard is broken by design, and has been designed by drunk people who wanted to emulate the bad behaviors of windows users.
Why would we want cache file in our home directory when we have a /var directory for this kind of stuff and especially a /var/tmp directory which has the sticky bit ? Who decided that cramming stuff into ~/.cache was a good idea instead of putting it in /var/tmp/usercache-<username> directory?
Why would we want a .config and .local directories full of binaries, artifacts and config files within our documents when we have /usr/local for that? Put that into /usr/local/<username> instead!
And then comes the terrible folder list:
Desktop : this one is largely unused by me, why putting icons in a screen when they will be mostly obscured by windows while I am using my computer? Do we have to replicate all bad ideas of Windows?
Documents : this one is okayish, but why isn't my whole homedir a documents homedir if we can clean it up from all the config, binaries and cache shit eh? Aren't Pictures, Music, Videos or what I download documents too?
Downloads : that one may be useful, although /tmp would be more interesting to me. For the most part if I don't use the files I download immediately I will never look for them or they will be possibly obsolete by the time I find them. It forces me to do housekeeping while having them in /tmp would clean the shit at next reboot.
Music: ok I suppose but nowadays lots of people are using streaming, I mean I can create it myself if I want to.
Pictures: this one is stupid, why is a picture not a 'document' and why would we need to separate it? What do I do if I want to put pictures asset in my markdown document? Should I point it to some obscure directory here or should I put it in myproject/assets/ ? OK some would argue this is a good place to auto import your photos from your camera but wait. If one day I use digikam but then I later decide it is not so great and want to use something else it is likely to make a mess.
Public: most people never use that. It is for file sharing purpose I reckon but it can be created whenever you need to by the 0.2% of people who will use it.
Templates: same as public, people are never that organized and will rarely put templates there instead of next to their docs. I never saw any app making use of that, most of the builtin templates are provided with the package and are stored in /usr/local
Videos: same stupidity as Pictures. My Videos ARE documents. Besides, what if I want to keep the videos of one event or my vacations next to the Photos? Why would I want videos of my kids playing on the beach be next to regular movies, porn, videos from a sports event I participated at or screen recordings?
All these folders are meant to target a majority of users but in the end create a fake sense of organization that doesn't really work for anyone, everybody end up having files everywhere and/or only partially following those conventions which end up with the same mess as having just the regular mess /home/<username> or /usr/local/home/<username>
I think I'm in a similar boat, great criticism of the user dirs. The directory structure seems too wishy-washy. Users can tweak where the actual directories are, and there are descriptions for what each env-var or directory should have, but the divisions made between types of file are not semantic enough, imo. And, agreed wrt temp files or cache files. There's /var/tmp or /tmp already, /usr/local/tmp, /usr/local, and so on. Permissions 'being weird' on most distros is something that can be addressed or fixed; no different than pushing people to change to XDG. In fact, it might be more beneficial to more projects if we get better-standardized "scratch space"s.
But then we'd be running into another cobbled together standard, with an even uglier history: The Linux Standard Base hierarchy. Which I just learned died a few years back. Huh. Turns out the filesystem is not something easily wrangled... System paths are something I've thought would benefit more from being configurable with env-vars (maybe even in the kernel argument list on boot, or via grub?). The major differences between distro filesystems would be abstracted away to their boot settings.
/boot/grub/linux-dirs.conf when?
I see some benefit in abstracting utility directories behind an interface so application developers don't have to worry about it, but the way it's gone about seems backwards and highly dependent on your environment containing the right variables. It probably needs to be handled below the user/application layer.
That would definitely be the way to go, sadly I think the linux desktop has to much inertia and it can only solved in a different OS, called a different way with its own directory structure. Where package maintainers are instructed to not package or patch any app that do not follow sane standards, where a flatpak equivalent would not put stuff into the same directory as the user's files, where a rootless container or a vm hypervisor would not put its stuff in the same directory tree
While it is not dead, Gobolinux failed probably because it was still advertised as linux, so people expect linux to follow some standards. I have no idea how redox, haiku and serenityos are handling that stuff, I hope they have been smarter.
Serenity is basically the same. Haiku is too close for comfort, but it's simpler because it's essentially single-user at present.
You want a radical idea? May I try to explode your brain?
We have persistent memory now. You can put a few terabytes of nonvolatile storage in your DIMM slots, and it's cheaper than RAM.
If your computer's memory map is entirely directly-addressible storage, every byte of every file is right there in the address space, all the time...
Then you don't need indirectly-addressed storage any more. No drives of any kind. No files of any kind. It's all in RAM all the time. You can dispense with filesystems completely and just manage it via an in-memory database or something.
No more folders. No more 2-dimensional tree. Every block of data can be found in 26 different indices if you want. Individual blocks of data can be in multiple programs, or documents, at once.
All that '70s hard disk stuff can just go away now.
But we're too scared. All we know how to do are disk drives and files in folders.
I am intrigued by this. I have an SSD that I cannot use due to the lack of an M2 slot in my desktop. How is this accomplished? Do you need an adapter for M.2 to DIMM?
Memory corruption could be more disastrous due to its persistence, but given the RAM bus is faster than SATA... This might work!
Thanks a lot (belatedly..) for the links! I have something new to consider in my next build. I really like this idea, it allows for a ton of freedom and you could do some weird wizardry with it. Also a lot of data corruption, haha.
I also don't really like XDG so much. I don't use any of those Desktop, Documents, etc; in fact I deleted all of them. I also do not use a desktop environment either. I use Linux, not Windows. (For documents, downloads, etc, I would specify explicitly each time what directory and file names I want, since they are often different each time anyways.)
> instead of putting it in /var/tmp/usercache-<username> directory?
Can't use fixed paths in tmp dirs, that's either a security issue or a denial of service attack waiting to happen. I can `mkdir /var/tmp/usercache-prmoustache`.
> Put that into /usr/local/<username> instead!
Not writable to regular users, and not meant for that.
> Can't use fixed paths in tmp dirs, that's either a security issue or a denial of service attack waiting to happen. I can `mkdir /var/tmp/usercache-prmoustache`.
Well we don't even need a fixed dir, a session generated dir with an env variable set to it is enough.
Or we could put that somewhere else in var. We created /var/run/<users> dirs, there is no reason we couldn't do other directories for other uses.
>> Put that into /usr/local/<username> instead!
>
>Not writable to regular users,
fixable
> and not meant for that.
I am pretty sure I have used some BSD in the past where the home directories were in /usr/home and /usr/local is a pretty good spot to put what is -- wait for it -- local to the machine!
There is no reason we couldn't have all our user owned binaries in /usr/local/<username>/bin and /usr/local/<username>/lib and our configs in /usr/local/<username>/etc
It would just have to be created at user creation with correct user rights but that is no big deal.
Users would just put their files in their /home, be able to sync it accross machines/ possibly different OSes without necessarily synchronising config files that do not apply to it or worse, unneeded cache files.
Their /usr/local/<username>/etc could be a git (or other versionning system) repo
Their /usr/local/<username>/bin lib share whatever could be saved and restored easily
And all the variable/ephemeral shit/cache could go to var where they belong.
What I also know however, is that creating a custom template is not something most users have been waiting for not something they use expect maybe for a tiny fraction that looked for that possibility and read the corresponding doc.
And that tiny fraction of power user could have created that directory when needed while currently it is just an empty dir that sits unusead on probably 99% of the users homedirs.
Why would we want cache file in our home directory when we have a /var directory for this kind of stuff and especially a /var/tmp directory which has the sticky bit ? Who decided that cramming stuff into ~/.cache was a good idea instead of putting it in /var/tmp/usercache-<username> directory?
Why would we want a .config and .local directories full of binaries, artifacts and config files within our documents when we have /usr/local for that? Put that into /usr/local/<username> instead!
And then comes the terrible folder list:
Desktop : this one is largely unused by me, why putting icons in a screen when they will be mostly obscured by windows while I am using my computer? Do we have to replicate all bad ideas of Windows?
Documents : this one is okayish, but why isn't my whole homedir a documents homedir if we can clean it up from all the config, binaries and cache shit eh? Aren't Pictures, Music, Videos or what I download documents too?
Downloads : that one may be useful, although /tmp would be more interesting to me. For the most part if I don't use the files I download immediately I will never look for them or they will be possibly obsolete by the time I find them. It forces me to do housekeeping while having them in /tmp would clean the shit at next reboot.
Music: ok I suppose but nowadays lots of people are using streaming, I mean I can create it myself if I want to.
Pictures: this one is stupid, why is a picture not a 'document' and why would we need to separate it? What do I do if I want to put pictures asset in my markdown document? Should I point it to some obscure directory here or should I put it in myproject/assets/ ? OK some would argue this is a good place to auto import your photos from your camera but wait. If one day I use digikam but then I later decide it is not so great and want to use something else it is likely to make a mess.
Public: most people never use that. It is for file sharing purpose I reckon but it can be created whenever you need to by the 0.2% of people who will use it.
Templates: same as public, people are never that organized and will rarely put templates there instead of next to their docs. I never saw any app making use of that, most of the builtin templates are provided with the package and are stored in /usr/local
Videos: same stupidity as Pictures. My Videos ARE documents. Besides, what if I want to keep the videos of one event or my vacations next to the Photos? Why would I want videos of my kids playing on the beach be next to regular movies, porn, videos from a sports event I participated at or screen recordings?
All these folders are meant to target a majority of users but in the end create a fake sense of organization that doesn't really work for anyone, everybody end up having files everywhere and/or only partially following those conventions which end up with the same mess as having just the regular mess /home/<username> or /usr/local/home/<username>