News for hackers. Stuff that matters.
Re:Dotfile madness by Memosyne on Saturday February 02, 2019 @11:32AM (#19063842)
Why do programmers do this? What thought process leads to someone thinking this is a good idea?
Re:Dotfile madness by bo1024 on Saturday February 02, 2019 @12:13PM (#19064168)
I developed a utility for my own use and found an answer to your question.

When the program starts up, it needs to know what its configuration is. This is not stored in the code. So it has to find its configuration data somewhere. Ideally, you'd let the user configure where they want the config file. But then the program has to read the config file to find out where the config file is, and it doesn't know where to look.

(So it seems like you pretty much have to put config data in the same place on every computer, or use environment variables.)

If you don't know about the XDG Specification in the article (I didn't), a $HOME/.myconfig file is by far the simplest and most robust solution.

Re:Dotfile madness by michaelmrose on Saturday February 02, 2019 @12:11PM (#19064148)
In order to have per user settings you have to have one dir per user. For practical purposes and security it ought to be somewhere only user has access it. Optionally it would be nice if you could back up all user settings and files in one place.

The logical conclusion is that it ought to live somewhere in home which meets the above criteria. Its obviously cleaner to store data in $XDG_* but keep in mind that some of the apps creating said files are actually older than linux and certainly older than such standards.

From dev and user perspective it would be nice to have them updated to follow the standard but in practice the practical effect is nil so lots of stuff doesn't bother.

Re:Dotfile madness by eknkc on Saturday February 02, 2019 @11:37AM (#19063895)
It is safe. Everybody does it, there is .gitconfig, .ssh etc so one more would not hurt.

Until there is 500 dotfiles, some long forgotten.

[dead]
Re:Dotfile madness by reaperducer on Saturday February 02, 2019 @11:57AM (#19064032)
And this kind of thinking is why it’s never “The year of Linux on the desktop.”
Re:Dotfile madness by geggam on Saturday February 02, 2019 @11:58AM (#19064047)
Linux has been on my desktop for 20 years.

Not my fault you dont run it there ;)

Re:Dotfile madness by IshKebab on Saturday February 02, 2019 @11:50AM (#19063991)
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).
[dead]
Re:Dotfile madness by kiallmacinnes on Saturday February 02, 2019 @02:08PM (#19064953)
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 by KyleJ61782 on Saturday February 02, 2019 @01:40PM (#19064762)
You realize this is the definition of gatekeeping, right?
Re:Dotfile madness by geggam on Sunday February 03, 2019 @08:43AM (#19069499)
Computer "engineering" is the only unregulated engineer I am aware of because of the damage they can do to society.

It is time we started doing that

Re:Dotfile madness by Epskampie on Saturday February 02, 2019 @11:33AM (#19063856)
In a way a users settings are ‘personal files’, so it can be argued they go in home.
Re:Dotfile madness by lytedev on Saturday February 02, 2019 @11:38AM (#19063898)
Except isn't there a specific directory for such things now in $XDG_CONFIG_HOME? Or is this not standard at all? Either way, $HOME/.config makes perfect sense to me!
Re:Dotfile madness by AnIdiotOnTheNet on Saturday February 02, 2019 @01:24PM (#19064649)
We didn't always have the XDG standards, they were bolted on later and consequently a lot of devs ignore them.
Re:Dotfile madness by saagarjha on Saturday February 02, 2019 @11:32AM (#19063848)
It’s a convenient place to store user data that works across platforms.
Re:Dotfile madness by reaperducer on Saturday February 02, 2019 @11:55AM (#19064019)
It’s a LAZY place to store user data that works across platforms.

FTFY.

If you don’t want to follow the spec, keep your program’s data in your program’s directory. If another program needs the data it can follow the $PATH, or ask the user.

Even better, ask the user at first run. You know, when asking people to accept some Byzantine EULA, license, and permission to track their grandmother.

Re:Dotfile madness by __david__ on Saturday February 02, 2019 @02:42PM (#19065180)
Your program is installed in /usr/bin—you can't write to that directory (nor should you).