Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: