五千年(敝帚自珍)

主题:【原创】斗地主 – 从地主谈编程说起 -- Highway

共:💬34 🌺49
全看分页树展 · 主题 跟帖
家园 How does *nix address this?

${HOME}/.profile is another example, though it only sets more general enviroment variables, like $CVSROOT for cvs. If each software needs multiple settings, this file will become lenthy.

I am curious on how most Unix/Linux softwares address this need. I think maybe each software can have one entry in .profile which stores the path of its own setting file for each user. And the path is in a user's home directory, which can be specified at the first time the user uses this program. If this user chooses not to specify it, a generic one is used in stead.

The entry in .profile may not be needed, but I can't think a better way to let the program know that there is a user specific setting file for it to start with. I feel *nix systems are more passive in managing processes, an entry in .profile seems more consistent to me. But there will be a confliction if different softwares use a same entry name.

This reminds me something else. If two different *nix softwares have same excutable name, how is the confliction solved?

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河