Live data from Hacker News

Dotfile madness

0x46.net

111–120 of 534 posts

Re: Dotfile madness

#111
One of the advantages, though, is per-user config for the same program, e.g. the .bash files. It's pretty common to have separate /home and / partitions too, and less common but doable to dual-boot different distros but share the same /home partition. Which is itself actually a reason to be very careful with back-compatability of dotfiles

Re: Dotfile madness

#112
post #90

Earlier quoted context omitted.

Speaking of Windows, their situation is worse. I remember installing a couple of games and suddenly my "My Documents" folder had "EA", "EA Games", "Electronic arts", "Rockstar games" folders.

Games do that by design so that they can be cleanly uninstalled without removing saved games and preferences. Also you should be able to backup your documents folder and not your programs folder and be safe. A good uninstaller should ask if you want to save them and remove them if you don’t. I am not saying it is the best way. But I don’t think it is malicious or lazy.

There is literally a folder in every Windows profile (Vista onwards) called "Saved Games", it should all go there.

Re: Dotfile madness

#113

Crazy idea: what if we were to just nest a personal directory within ~? i.e., New standard directory `~/personal`, new environment variable, $PERSONAL. If we could come up with a default `~` like character for globbing to `$PERSONAL` like `~` does to `$HOME`, say, `@` (obviously that isn't the char to go with and I'm not a BASH expert to be able to pick one not already occupied). All your personal dotfiles are in `~`…

This is adding pain for the victim to get around abuse. And then abusers would simply pollute $PERSONAL.

“There is no problem in computer science that can't be solved using another level of indirection.”

Re: Dotfile madness

#114
post #2

This isn't just a Linux problem. In Windows, the users /documents folder is polluted in exactly the same way these days.

Also on macOS, where [~]/Library/ApplicationSupport is the designed and recommended place to store config files, logs, preferences and all kinds of persistent data, the home directory still gets cluttered. It's a laziness issue, it won't be solved solely by making is easier to access the right locations on each system/platform, but that would be a step in the right direction.

I have no idea how macOS organises its stuff. There's like 10 levels in my Library Folder, and some of them just repeat higher levels.

Re: Dotfile madness

#115

.files are very useful. I like the consistent idiom for where your "global" settings go for virtualenv, npm, tslint, flake8, git, whatever. But it would have been so nice just to move it into a ~/cfgs or fine... even a ~/.cfgs or whatever. I'm guessing engineers went, "ewww, I'd have to walk down the tree to find the next most relevant config file to use and then go UP into a directory when I hit home."

Most of what I use supports the XDG ~/.config directory, which is nice. But there's still some that doesn't support it.

https://wiki.archlinux.org/index.php/XDG_Base_Directory#Hard...

Re: Dotfile madness

#116
post #16

To name and shame some culprits (the one's who have shame, I won't name java because I won't expect them to care) 1) Mozilla 2) Gnome 3) Gimp 4) GPG 5) Thunderbird (Why is there a sep directory and not under .mozilla) 6) mplayer I guess one reason why this occurs is that it's easier for to be carelessly cross-platform this way. Except you'd expect better from mozilla, specially because they store Windows stuff very w…

There's a pretty good list on the Arch Wiki of hardcoded config locations.

https://wiki.archlinux.org/index.php/XDG_Base_Directory#Hard...

Re: Dotfile madness

#117

Crazy idea: what if we were to just nest a personal directory within ~? i.e., New standard directory `~/personal`, new environment variable, $PERSONAL. If we could come up with a default `~` like character for globbing to `$PERSONAL` like `~` does to `$HOME`, say, `@` (obviously that isn't the char to go with and I'm not a BASH expert to be able to pick one not already occupied). All your personal dotfiles are in `~`…

I already kinda do this, ~/company for work, ~/kt for personal, and a bash scrip it’s alias’ and vars to make it easy

Re: Dotfile madness

#118
post #21

I don't get the problem. Why bother where dotfiles are written to? GUI file managers and userland tools hide them by default. What would I gain by having them written outside of $HOME?

I don’t use a GUI on servers. I use a terminal on my laptop all the timr. I also have dot files always visible in my GUI.

Re: Dotfile madness

#119
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 bother me.

But nowadays, lots of applications seem to think it's OK to put normal files in my home folder without asking first. This is just outright barbarism. In particular, Ubuntu now seems like it's all-in on snaps, and if you use snaps, they create a non-hidden "snap" folder in the user's home folder. Madness! And when people complain, the devs have the gall to suggest that this is all fine:

https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053

I like the idea of snap/flatpak in the abstract, but until they get their act together, and stop creating non-hidden files in my home folder without asking first, I am never going to use snaps.

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.

But at least in that case the user can change the environment variables and delete the stupid folders. No such luck with ~/snap.

Re: Dotfile madness

#120
post #92

Earlier quoted context omitted.

Also on macOS, where [~]/Library/ApplicationSupport is the designed and recommended place to store config files, logs, preferences and all kinds of persistent data, the home directory still gets cluttered. It's a laziness issue, it won't be solved solely by making is easier to access the right locations on each system/platform, but that would be a step in the right direction.

I would honestly like to blacklist my home folder. Do you want to create a new file/folder? I am notified with a popup and if you ask to often I am gonna stop using that. Not really workable but one can still dream...

This is actually possible (on Linux, at least, probably Mac/Windows too) with something like selinux. It ends up being a huge headache though, both because selinux is kinda hard to configure, and because you will get a constant barrage of requests.
Post reply on HN