Idea of the week: Universal config file user interface

Here I am again, sitting around thinking about exciting software ideas when I actually should be working. This time it’s all about config files. How many times have you either:

1. Complained to yourself when you encounter a config file that uses its own file syntax
2. Wished that there was a gui available for some option you frequently change
3. Wanted to have all configuration options in one place?

No, I am not going to suggest that we make our own “KDE registry”. I am also not going to suggest a solution that needs each and everyone to adapt to it.

As the title hints, I want to create an universal config user interface. The way it would work, is that it would be split into two parts. One is a kind of a parser, that has a collection of config file syntaxes (think for example vim’s collection of syntax highlighting files) defining rules and other useful properties for a certain type of config file. The other part would be the gui itself, which would let the user play around with settings and see things change, while at the same time be certain that no fun is spoiled due to a misspelling, invalid value for a certain setting, or other similar unfortunate mistakes. As a plus, it could probably also be set to backup changes and save versions of the configuration in case things go terribly wrong.

Why would one want this? Well, editing config files for all your setup needs is a pain. But so is creating a gui for them. And while I of course acknowledge that advanced users prefer the possibilites that having settings in a text file bring, advanced users are humans too. Humans that make mistakes, and then spend hours debugging and searching for what’s wrong when they suddenly discover a single line in ~/.myfavoriteditorrc  “DoNotEraseMyWork = Treu”.

Also, it would be good to use as a fallback when you are going to instruct someone to change a more advanced setting, but at the same time don’t want to have to explain to them why it doesn’t work even though they typed “DoNotEraseMyWork = True” and saved it in ~/myfavoriteeditorrc.odt.

Does something like this already exist, maybe? Tell me in the comments.

22 Responses to “Idea of the week: Universal config file user interface”

  1. Dennis Says:

    Yeah, it’s a very good idea.🙂

    It would be nice, if your universal config interface integrates in kcontrol to have only one place on system for administratio

  2. Pau Garcia i Quiles Says:

    What you are proposing is something like KioskTool. Unfortunately, KioskTool only works with KDE3. I started a port to KDE4 (it builds and runs but does nothing because I did not port DCOP to DBUS) but decided the application needs a complete rewrite, something I don’t have the time to do in months.

  3. Elias P. Says:

    I think something like your suggestion, built on top of Augeas ( http://augeas.net/ ) would absolutely rock!
    Augeas feels to me a little bit like a dream come true😉

    Regards, Elias P.

  4. jpo234 Says:

    http://www.solucorp.qc.ca/linuxconf/

  5. d. Hensley Says:

    Well, something like it, yes;
    http://www.webmin.com/index.html (Webmin)
    Possibly a good modular structure to use as a guide for creating your KDE universal config user interface.
    Nice idea, BTW.

  6. Jucato Says:

    Actually, I think his proposal more closely resembles KConfigEditor (http://extragear.kde.org/apps/kconfigeditor/). I personally think this would be a great system administration tool. It’d definitely not a registry since it isn’t a central database of KDE configuration files, but more of a convenience viewer/editor.

    I’m imagining that the most difficult part of the app would be presenting the user with *all* the possible config choices, since some of those do not get written to a config file until they are changed in the settings. Perhaps that’s where the “collection of config file syntaxes” comes in?

    Good luck with the app (if you’re going to push through with it). Maybe I might be able to help once I get my KDE-fu up to a reasonable level.🙂

  7. Harald Says:

    @Pau Garcia:
    Well, yes and no, from looking at a few screenshots. Yes because kiosktool is a gui collecting things from several sources, but no because it’s not universal or geared towards advanced users…

  8. Miguel Says:

    Something like gnome has, maybe. Don’t know the application name. But it’s universal, contains all configs and it’s “value safe” (as far as I know). Maybe an idea can emerge from that.

  9. Corey Burger Says:

    Rather than change all configuration files, you can just provide standard interfaces to them. The augeas project, funded by Red Hat, is doing just that:
    http://augeas.net/

  10. Will Stephenson Says:

    Jucato is right. What you suggest is using KConfigEditor, an app-independent config editor that uses the .kcfg files we install in eg /usr/share/kde4/config.kcfg/ to know the structure of apps’ config files and allow you to edit them. KConfigXT already supplies the parser. I’m not sure if KConfigEditor performs input validation but the .kcfg files do have simple data constraints such as min/max values and typing.

  11. jospoortvliet Says:

    PLEASE revive KConfigeditor😉

    It’s a great tool, unfortunately it’s dead… It was not only capable of working with the KDE apps configuration, but also the Gnome config. So if you had one or two gnome apps installed you didn’t need all the gnome config tool crap to be able to configure things!

  12. Willem Says:

    So you are suggesting something akin to the sysconfig tool in openSuse’s Yast? It is GPL and has UI in Qt and ncurses so you could adapt it easily.

  13. Holger Schurig Says:

    Redhat also has a project that can parse many config files, even apache, lighthttpd, openradius or simpler ones like nssswitch.conf. Unfortunately, I’ve forgot the name. It’s still a project, not a tool that is bundled with RH or RHEL. I think I read about it some months ago in LWN.

  14. Harald Says:

    Good to hear that there are many applications like this already out there. But one I thing I want to know though; does any of these applications actually provide any description as to how to setup the different fields? For example, for apache, would it tell you that a certain field can have the values StandAlone and Inetd, and explain their meanings?

  15. TheBlackCat Says:

    @ Harald: I know opensuse’s syconfig editor does provide that sort of information, but it only deals with files in /etc/sysconfig/

  16. Aaron Seigo Says:

    @Harald: yes, kconfigeditor provides value options and controls. take a look at the source, it’s all right there.

  17. nxvl Says:

    http://augeas.net/ can be the tool you are looking for

  18. Michael Leupold Says:

    Just for reference (not endorsing anything):
    The elektra project is trying to create a configuration library that can be used by other projects (and they are even spending time on elektrifying other projects :)). It seems different from what you talk about because getting the benefits of it needs you to change your software. Still I figured it might be nice for reference as they also provide different config backends: http://www.libelektra.org

    And yeah, they seem to lack manpower🙂

  19. mike wyatt Says:

    Augeas seems really nice, but one languge that really took me by surprise was YAML. it’s super easy for humans to read, easy to parse, and has lots
    of capabilities

  20. Andrew Mason Says:

    If the configuration files are in XML then you can write a dtd or schema or rng file which will perform this sort of validation. There are quite a few validating xml editors out there which support dtd/schema etc.. and can present these in a way which allows the text file to be read (minus the ) and only the valid options presented to the use.

    This has the down or up side (depending on how you look at it) of requiring valid xml config files and also to keep the dtd up to date when config directives are altered. Its a simple and easy approach which would allow each application to control its own config files whilst still giving the ease of use your after, but sadly won’t work for .ini

    foo = bar

    style configuration files.

  21. Raphaël Pinson Says:

    Augeas is what you are searching for (http://augeas.net). There are already config file editors using it as a backend, like Config::Model for example (http://freshmeat.net/projects/config_model/?branch_id=63756&release_id=288341).

    Augeas provides an API to parse and write config files of every predictable form. It prevents from managing a separate database (the registry idea) or having tons of modules to parse your files (like webmin or linuxconf would do).

    @mike wyatt, Andrew Mason: Yes, YAML is very easy and powerful (and I use it for most of my config files) and XML is also powerful (although not as readable as YAML), but until most programs use it, there is still a need to parse and write existing formats. Augeas provides an XPath interface to all kinds of config files, allowing you to treat them “as if you were dealing with XML” and letting the Augeas API deal with parsing and writing back to the proprietary config format, because you can’t force developers to use standards😉

  22. Revival of your favourite admin-tool « alediaferia::hackingAround() Says:

    […] ago metellius posted this “Idea of the week: Universal config file user interface” and among the comments someone talked about the good old KConfigEditor. It’s a great app […]

Comments are closed.


%d bloggers like this: