Live data from Hacker News

Dotfile madness

0x46.net

151–160 of 534 posts

Re: Dotfile madness

#151

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…

This is particularly weird, since click (snap's "predecessor" at Canonical/Ubuntu) was fully XDG compliant, even encouraging developers to separate data from cache etc. (unlike flatpak which just dumps everything in ~/.local/share/[...], though that is still infinitely better than using ~/snap).

Re: Dotfile madness

#152
Same mess on Windows with the My Documents folder. I simply abandoned it, treating the folder as "My Spam From App Programmers", and keep the meaningful stuff in a totally different place.

Re: Dotfile madness

#154

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…

I use ubuntu 18.04 (kde) and my snap folder is /snap I don't know how I did this.

Running something with sudo?

Re: Dotfile madness

#155
I have the opposite perspective. Dotfiles are fine, and I find the proliferation of XDG directories confusing, mostly because they're misused. Why should a game's save files be under .config? Making dotfiles under $HOME is a simple approach that's worked for a long time and that doesn't cause serious problems, and I see no need to adopt the XDG approach, which I see as overengineered.

Re: Dotfile madness

#156
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…

I think dot files in home directory for configuration files are fine, especially if the user creates the files themself rather than the program created them (although sometimes a program may wish to create a user cache file, for example Free Hero Mesh creates a file ~/.heromeshsession by default but you can configure a different name if you wish; also some programs such as web browsers may store cookies and so on, although you should be allowed to reconfigure that, too). A program might also support a command-line switch and/or environment variable to override what file (in what directory) to use.

Requiring files in your home directory that do not have a dot at first (with a fixed name) is no good, though.

Re: Dotfile madness

#157
post #33

Earlier quoted context omitted.

If it was completely controllable, I’d have the ability to control where they are and put them out of my way. Lazy programmers use home as a default. Home directories have become the *nix version of the Windows Registry.

Very likely you do have the control. You simply haven't taken the time to learn how to configure things.

Quite a few applications still have their config path hardcoded.

https://wiki.archlinux.org/index.php/XDG_Base_Directory_supp...

Re: Dotfile madness

#158
post #35

Earlier quoted context omitted.

That's an intellectually lazy thought. If everyone had that attitude we wouldn't have modern society at all (grow your food, don't expect someone else to grow it for you).

Linux has been and is a tinker OS for folks who know wtf they are doing. As time progressed it has become easy enough folks who dont know what they are doing can use many of the distributions. Those folks are destroying what used to be a wonderful intelligent linux community.

I don't even know what to make of this comment.

Nobody is forcing you to interact with those "new users", if you don't like them, ignore them.

Frankly, if everyone had your attitude, your Linux community will be dead and gone in a few short years as time progresses, and your old users pass away.

I've been a Linux user for a long time, I and many other long time Linux users do not share this persons opinions. New Linux users, keep coming, the vast majority of us are not elitist.

Re: Dotfile madness

#159
> Avoid creating files or directories of any kind in your user's $HOME directory in order to store your configuration or data. This practice is bizarre at best

I believe the article itself is an existence proof that it is in fact, not bizarre.

Re: Dotfile madness

#160
post #88

Earlier quoted context omitted.

Sounds like you might need to hook rename() if you'd like to add that feature too, but I would still say it's straightforward.

The way most editors save a file is like this: f = open("the_file.new") write(f, new_contents); close(f); rename("the_file", "the_file~"); rename("the_file.new", "the_file"); So the old file is never modified, it's renamed to the backup copy, and an entirely new file is created to take its place. This has a number of advantages, but does not play well with any extended info the old file used to have, unless they are…

If you do not rename files while holding their open file descriptors there's no guarantee that you are renaming the file you just wrote to.
Post reply on HN