Live data from Hacker News

Dotfile madness

0x46.net

331–340 of 534 posts

Re: Dotfile madness

#331
post #314

Earlier quoted context omitted.

As noted below there's a special folder called "Saved Games" that's specifically meant for this purpose. A lot of games still don't use it.

And here I am, still wanting my save files to reside next to the games exe...

Fair enough but on multi-user systems you can surely see the value in separate save game folders?

Re: Dotfile madness

#332
I think this is a silly complaint. These are preferences storage. The home directory is absolutely the most logical place for these.

I actually like that there are applications that actually still have preferences. My biggest pet peeves are applications WITHOUT preferences. Careful what you wish for.

Re: Dotfile madness

#333
post #252

The real problem is that any app I run accesss all files I own with equal permissions. App1 and App2 shouldn’t write their data to my home, or read each other’s data, or, please, be able to write each other’s data. A video game can read my tax forms. WTF. Mobile & tablet OSs solve this. Everything has to follow. Until then, basically every app should run in a docker container. Then it can do what it wants.

BSDs have had jails for ages, which (unlike Docker) have been designed as a security isolation mechanism from the get go.

https://www.freebsd.org/doc/handbook/jails.html

Re: Dotfile madness

#334

Earlier quoted context omitted.

Save games is a poor example. Users often need to back them up. Backup systems often include Documents by default but not AppData. Files in AppData are hidden, and you would not expect users to find them. Further, many save games can be opened with a text editor just fine :)

As noted below there's a special folder called "Saved Games" that's specifically meant for this purpose. A lot of games still don't use it.

To be fair it's widely used now, it just took a while to adopt because of compatibility issues.

Finding the directory requires new APIs introduced in Vista and Server 2008. See SHGetKnownFolderPath

Re: Dotfile madness

#335
Gonna say I expect to see the dot files and don't really care.

I think to be upset over that is just looking for a fight.

It works across all of my OS's, I know its config specific to the app, and if I want to jump in and get some info it is just a ~/ away...the overhead is so low I've spent more time thinking about it in this statement vs all the time ever wrestling through them or battling tribal knowledge.

I guess I just don't see a strong enough argument here.

Re: Dotfile madness

#336

A lot of other people have made some fantastic points here, so I won't harp on "putting random crap in ~/ bad!" any further. However, since it has not been mentioned, I would like to shout out to the Python "appdirs" module[1], which neatly solves this issue for those writing programs in Python with minimal effort. The best part is that it uses the platform's native standards, so XDG on Linux, plus whatever macOS and…

In C# and other .NET languages, you'd use this:

https://developers.redhat.com/blog/2018/11/07/dotnet-special...

Many of these are named Windows-centric because of the history of the API. But where possible, they still map to something reasonable elsewhere. Looking at the mapping table, I can't think of anything it doesn't cover.

Re: Dotfile madness

#337
post #252

The real problem is that any app I run accesss all files I own with equal permissions. App1 and App2 shouldn’t write their data to my home, or read each other’s data, or, please, be able to write each other’s data. A video game can read my tax forms. WTF. Mobile & tablet OSs solve this. Everything has to follow. Until then, basically every app should run in a docker container. Then it can do what it wants.

There's a very simple solution to this: Don't run apps that you don't trust. If you simply must , use a VM or AppArmor or SELinux. Don't inconvenience everybody because you're too lazy to be responsible for your own data. Besides, untrustworthy apps will bypass the protections anyway. Judging by the popularity of "curl | sudo bash" lately, they'll probably just ask for root directly.

"Don't run apps that you don't trust"

So basically no apps at all.

Re: Dotfile madness

#338
post #137

Oddly I feel completely the opposite about this topic. I think dot files in your home directory are exactly the way to go. Using the XDG standard leaves you with whatever the distro decides is the correct location for these files. While their recommendation is all in the home directory, I wouldn't put it past some of these distro developers to make some crazy /var/users/{uid}/config directory. This is important when…

At my university I only have write permissions in my home folder so I prefer this too and I only need to backup my home directory as well.

You don't have permissions to create directories in your $HOME, or write files to them?

Re: Dotfile madness

#340

I think this is a silly complaint. These are preferences storage. The home directory is absolutely the most logical place for these. I actually like that there are applications that actually still have preferences. My biggest pet peeves are applications WITHOUT preferences. Careful what you wish for.

I agree that the home directory is the most logical place for files like these, but it would still be nice if they were in a consistent place. That way, if you wanted to delete your preferences for a specific application, you know exactly where to go without searching around. Personally, I think this should be enforced by the operating system instead of leaving it up to the developers.
Post reply on HN