Live data from Hacker News

Dotfile madness

0x46.net

421–430 of 534 posts

Re: Dotfile madness

#421
post #172

Earlier quoted context omitted.

Windows also has an app data folder that contains a whole mishmash of stuff. And of course you have the registry. Part of the problem in Windows is that Program Files is write protected for security, so you can't store a local configuration file relative to the exe. So where does it go? I assume there must be documentation from Microsoft and Apple about best practices for this... I hope? To answer your last question:…

> Part of the problem in Windows is that Program Files is write protected for security, so you can't store a local configuration file relative to the exe. So where does it go? This hasn't been a problem since the first version of Windows that had a filesystem with such protections - that would be Windows NT 3.1. The correct location for such stuff is %USERPROFILE%\AppData\Roaming or ...\Local, depending on whether th…

> The problem is that so many apps just straight up ignore all those guidelines.

The fact it happens so often suggests that the documentation isn't good enough.

> Of course.

At least Apple's pages is pretty clear and has some nice diagrams.

I think this page is more appropriate: https://docs.microsoft.com/en-us/windows/desktop/shell/csidl

It's reasonably well documented for UWP, though I can't find an equivalent for Windows: https://docs.microsoft.com/en-us/windows/uwp/design/app-sett...

Hence why I suggested that Qt has the right approach. It also has http://doc.qt.io/qt-5/qstandardpaths.html which abstracts out standard paths for cross-platform applications.

Re: Dotfile madness

#422

Earlier quoted context omitted.

It is not okay for some application to store files in My Documents folder. If it's not MY document then it doesn't belong in My Documents. The user folder exists for a reason. Drop your crap in there.

It hasn't been "My Documents" since Windows XP. It's just "Documents" now, so if we're taking the name literally, then any document can go there.

To be pedantic, My Documents still exists as shortcuts in the user folder.

Re: Dotfile madness

#423
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.

Mobile & tablet OSs solve this. Everything has to follow.

No no no NO!!!!

Think of all the things you can't do on a mobile device that you can do on a PC, or which require ridiculous workarounds like uploading from one app to some server on the Internet and then downloading again into another. Effortless data interchange is what makes computing great, and stops proprietary walled-garden data-silos from becoming the norm.

Re: Dotfile madness

#425

TIL I'm using ~ in the wrong way. For me ~ was always the default place for user-level configurations and time taught me to do so: .X* .bash* .vimrc and others. Than I create my personal folders ~/{src, docs, bin, porn, anime etc}. ~ is for temporary files I'll delete after use like windows users do with their Desktop folder. Also my ls isn't an alias with -a flag...I'm alone here? :|

I think an issue I have with it is if I want to move the configuration to another place, the only way I can do it is via a symlink. If applications used the variables above, you would be able to easily organize things differently if you choose to. This would also allow you to test if something there is causing issues or if you wanted to format and reset things. Just delete that directory or set the variable to anothe…

Indeed, without env. var we are stuck with ~ "madness"

Re: Dotfile madness

#426

Earlier quoted context omitted.

Python did this until very recently too. Windows has a problem, because people expect to use those programs in the command line and the %PATH% has a size limit and is a bit difficult to set-up properly.

I always thought it was because that space in “Program Files” was troublesome for a lot of programs, particularly command-line ones. IIRC, older versions of MinGW for instance would simply not work at all if installed in a path containing a space, because some of their startup scripts didn’t properly quote all parts of the path.

The last time I went near MingW I think I came across that very problem. Suffice it to say I backed off slowly and didn't go back!

Re: Dotfile madness

#427
post #342

To me, the real problem is not the dotfiles, but the regular (i.e. non-hidden) files that applications surreptitiously create in my home folder. (Which the author does mention as being particularly bad.) dotfiles in the home folder are not a new thing on Linux (e.g. .bashrc, .profile, .emacs, etc.), even if it would be better if more applications used the XDG folders. And if I don't see them when I "ls", they don't b…

> And of course, all this is on top of the new fashion for the OS to "helpfully" create Documents, Music, Video, etc folders in my home folder, and set the XDG environment variables to point to them. Noooooope. Yuuuup. It baffles me how Linux users can simultaneously complain that 'its never the year of the Linux desktop' and then at the same time rile against basic usability tenets. The average users wants/needs Doc…

Well, I know that I hate them. And I know a lot of other people that hate them. And I'm pretty suspicious of 'features' that allegedly make life easier for naive users by definitely making life harder for experienced users.

And I guess I would call it a "basic usability tenet" that the computer does what I tell it to. Documents, Music, and Videos folders violate this, because if I do the seemingly-obvious thing of just deleting them, the applications that want to use them will just recreate them unless I edit ~/.config/user-dirs.dirs. So, if developers really think they need to 'help' their 'average users' by creating these folders by default, they should finish the job and honor my desire to not use them, which I've expressed by deleting the damn things.

Also, if I want to rename them, the system should honor that. E.g. if I rename "Music" to "music", applications should not then go and re-create a "Music" folder.

Or, you know, they could just simplify my life and theirs by not creating these 'special' folders in the first place.

Re: Dotfile madness

#428
post #317

Earlier quoted context omitted.

> you have to put so many gitignore exceptions and I'm not even talking about the gigs of data all the chromium derivatives put into that folder Yeah but chrome devs half-assing the trivial xdg spec doesn't mean that xdg sucks - its just not implemented properly.

I think xdg has an issue of being obtuse when I googled it a while ago, it was very confusing, and I didn't find any real definitions. However I didn't look that hard.

Freedesktop standards are nothing if not overly complicated and confusing.

Re: Dotfile madness

#429
Yeah, great, rather than just going to the .foo directory for the foo program to find user specific state for that program I have to first figure out where the particular distribution likes to put things by default and then hunt through something like 5 different hierarchies for the foo directory.

The "old" way forced program developers to put things in a very specific place. The new way allows then to interpret the XDG standard however they want and scatter everything all over the place.

Re: Dotfile madness

#430
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.

Mobile & tablet OSs solve this. Everything has to follow. No no no NO!!!! Think of all the things you can't do on a mobile device that you can do on a PC, or which require ridiculous workarounds like uploading from one app to some server on the Internet and then downloading again into another. Effortless data interchange is what makes computing great, and stops proprietary walled-garden data-silos from becoming the n…

Agreed, and we’re now in serious danger of “Okay button fatigue” or whatever you’d like to call it.

If every normal app has to ask for permission to use your disk, you’re just going to click “Okay” when malware asks. Then the whole system was for naught.

Post reply on HN