Advertisement

Linux registry

Started by April 11, 2003 01:40 PM
32 comments, last by BradDaBug 21 years, 9 months ago
quote:
Original post by Prefect
Linux doesn''t need something called a "registry" (some argue that it''s already present in /etc), but a standardized config file format sure would be helpful, for two reasons:
- humans don''t need to learn new syntaxes all the time

Use XML. And require the application author to provide a schema with the app. That way, anybody can parse, comprehend and/or manipulate configuration data. A single, pluggable configuration utility can serve all conforming applications without imposing a config format or location on the application.

The config file should merely be named <appname>.conf and be stored in /etc if system-wide or /home/<username>/.<appname> otherwise. Yeah, conventions have the disadvantage of not ensuring or guaranteeing anything, but they still leave room for flexibility and creativity.

The Windows registry is convenient in many respects, but a pain (as with the rest of the system) once you skirt the trivialities. I always prefer short-term inconveniences for long-term benefits (the *nix way) over the inverse (the Windows way). Right now I just wish upper management would see things the same way...
IMHO, user configuration files should be put into a dedicated directory (e.g ~/.config/.conf). I like my home directory clean

cu,
Prefect
Widelands - laid back, free software strategy
Advertisement
See! That''s the problem! Naturally everyone wants to have their config file in a different place, but how does whatever program find the config file without knowing ahead of time where to find it, which it can''t with out a config file.... its a vicious cycle!

Right now I''ve just added a command line option where you can tell the program via the command line where to find teh config file. That works OK i suppose, but it seems like a hack to me.

Current Projects: GK3 for Linux | Landscape Engine | Bug Hunt
I like the DARK layout!
Why not just make an environment variable (or two) that tell the program where to look for its config file, with a special symbol to represent the executables location. Something like the path variable, but for config files.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

This topic is closed to new replies.

Advertisement