- cross-posted to:
- technology@lemmy.ml
- cross-posted to:
- technology@lemmy.ml
I wholeheartedly agree with this blog post. I believe someone on here yesterday was asking about config file locations and setting them manually. This is in the same vein. I can’t tell you how many times a command line method for discovering the location of a config file would have saved me 30 minutes of googling.
If it’s not in /etc it should be in the directory the exe file is located.
Certainly not. Nothing should write to /usr/bin except for the package manager in FHS distros and some distros binary directories aren’t writable at all.
Well good because a program shouldn’t be writing to its config file either.
~/.config
is the non-root version of/etc
these days. But you just have to know that, which isn’t ideal.If you are a developer, please take a look at the XDG Base Directory Specification and try to follow it, users will be very grateful.
Short summary: Look for
$XDG_CONFIG_HOME
for configs and$XDG_STATE_HOME
for state. If they aren’t available, use the defaults (./config
and.local/share
).
Start your application / program with “strace” and see all the files it opens.
Also run “lsof” on a running process to see what files it has open.
I doubt that’s a linux problem. All apps store config in /etc, ~/.*rc or ~/.config
Everything else should be considered a bug (looking at you, systemd!)
I’d take it a step further and say that all programs should be completely self-contained in one folder.
That doesn’t work well for… well, most software I can think of.
Games: I do not want to backup the entire folder to ensure I have my save files. Modern games are huge. I want my saves to be located somewhere easy to get to (for the average user) and be quick to backup, without having to go in and cherry-pick specific files.
There was a good trend of usingDocuments/My Games
, but sadly that seems to have fractured and now there’s alsoSaved Games
,savegames
, and some software has moved to usingappdata%
or just storing saves in the game install location. There’s no consistency, it’s a real pain in the hole.DCC software (Blender, Photoshop, whatever): user preferences and config files. Again, I idon’t want to backup the entire software, as I’m likely to reinstall it from an official source when migraing/reinstalling to ensure I have the latest updates. However I do want to be able to backup my preferences or plugins easily.
Any software that allows users to customise it: let me backup those preferences without cloning the entire app.
I do wish there was a standardised folder struture for user data, but it’s 2023 and the chances of getting Windows/Max/Nix to agree upon and comform to a generic structure as sadly. The only thing I can think of that’s the same across platforms is the
.ssh
folder.The different OSes generally have a prescription for where to put things. Windows is a stickler about Program Files and the only thing that should exist there is install content.
My Games and Saved Games is a remnant of times past when they were trying to figure out where to put that stuff. Generally, %Appdata% is where they recommend storing config and files that your application may mutate over time. e.g save files or logs
They just decided it didn’t make sense to break that stuff up and not every application dev has caught up to that.
For Mac, the /Library/Application \Support directory is where config files should live. Though some apps support /Users/<user>/.config for account level configs.
For Linux, as others have pointed out, /etc for global config or /home/<user>/.config for account level config.
The frustration about not knowing where to find things either comes from not knowing the standards or developers not following them. (Or Microsoft changing them every 2 versions)
Edit: Mac uses Users not home.
Yep. My main gripe is that due to various developers not catching up with new standards, a users files can be scattered all over the place.
I appreciate that - in theory - %appdata% should contain just a users files, but a number of apps also use it to store program data leading to a huge folder size. My own is >100GB, with some of the largest offenders being python and node dependencies that are not specific to myself, and could really be cached somewhere else.
Oh yeah, app data where every goddamn thing loves downloading cached files.