this post was submitted on 28 Sep 2023
665 points (98.7% liked)

Linux

47323 readers
1003 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] AKADAP@lemmy.ml 95 points 11 months ago (5 children)

I absolutely despise the following directories: Documents, Music, Pictures, Public, Templates, Videos. Why? Because applications randomly dump stuff into these directories and fill them with junk files. I don't want any application putting anything into directories I actually use, unless I explicitly tell them to. It is not possible to keep your files organized if applications randomly dump trash files into them.

[–] herr@lemmy.world 57 points 11 months ago (5 children)

Same shit happens on Windows. Games will just install their shit literally all over OS with no rhyme or reason to it.

Why can't the save game and config.ini just be in the main god damn game directory? Nobody knows.

[–] jasondj@ttrpg.network 23 points 11 months ago (2 children)

Actual reason is system permissions.

Most the default installation path is Program Files. That needs elevation to write to. Fine when you’re installing something, but not something you want to need just to run the game.

Writing to %APPDATA% or really anywhere in %USERHOME% is guaranteed to have the right permissions for this user.

Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.

It’s no different in Linux. You don’t want users writing to /etc. And you may expect multiple users. So all of that stuff goes to dot files in $HOME.

[–] kariboka@bolha.forum 6 points 11 months ago

Hence dot files

[–] Trainguyrom@reddthat.com 1 points 11 months ago (1 children)

Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.

I tried setting up my main windows gaming machine with a separate admin and user accounts, and tried to set it up to be multi-user. It didn't work well. Most games worked but some random games had all sorts of bizarre issues, from only being able to run as admin, to requiring messing with directory permissions to just plain strange behavior but working sometimes. Steam also really didn't like if I tried to run games as a different user and got very confused at times by the multiple user accounts

[–] jasondj@ttrpg.network 2 points 11 months ago

See, that’s dumb. Just because games aren’t enterprise software, there’s no reason basic security practice like least-privilege shouldn’t apply in development.

[–] lloram239@feddit.de 22 points 11 months ago (1 children)

Why can’t the save game and config.ini just be in the main god damn game directory?

You'd lose all save games every time you uninstall the game. We already had that in DOS/Win9x days and I am very happy that we moved away from this. Static program data and generated data should be clearly separated.

In Linux we have the XDG Base Directory spec for that, that gives you directories for cache, config, state and data, so everything is nicely separated. The only problem is that not every app follows it, bug reports can help.

I find Android handles this by far the worst. They have the core right idea with permissions that makes it impossible for games to write outside of their assigned directories, but the way they handle it your savegames go into an area that will be deleted when you uninstall the app. So the risk of losing savegames is extremely high. The alternative is that games require SD card permissions and than just write wherever they want. It's basically all just a dark pattern to force games into using the Google Play service for cloud saves. Games that lose state and restart when you switch apps are also great.

[–] GyozaPower@discuss.tchncs.de 1 points 11 months ago

I mean, in Windows they literally have a "saved games" folder and almost no games use it. I too hate that most fucking games have to save their shit to the Documents directory. That's the directory FOR MY FUCKING DOCUMENTS, NOT GAME SAVEDATA

[–] PixxlMan@lemmy.world 2 points 11 months ago

I have my own directories on windows. I never use system provided directories for my own stuff, it always sucks. And if I want to move directories between drives or just change permissions, all hell breaks loose because everything depends on the default locations... So I just leave them be if I can.

[–] nayminlwin@lemmy.ml 1 points 11 months ago

They're probably trying to handle per user config. But nowadays, there's mostly only one user using a machine.

[–] lloram239@feddit.de 14 points 11 months ago (1 children)

I absolutely despise the following directories: Documents, Music, Pictures, Public, Templates, Videos.

Change them: https://wiki.archlinux.org/title/XDG_user_directories

[–] Chewy7324@discuss.tchncs.de 17 points 11 months ago

The apps dumping files into foldes like Documents usually don't care about the XDG_user_directories spec, iirc.

[–] akash_rawal@lemmy.world 4 points 11 months ago

I just keep my stuff far away from $HOME and not bother about the junk. Not even a subdirectory under $HOME.

Same goes for ' My documents' on windows.

[–] tigerjerusalem@lemmy.world 1 points 11 months ago

These places are a cesspool of junk in every system, it's incredible. MacOS has this kind of shit too, just like Windows, with apps dumping crap there without a care.

[–] BeeMe@beehaw.org 1 points 11 months ago

This is why I've made a "Filing Cabinet" directory. My stuff goes in there nice and organized, while I ignore the rest.