drakSimpleConf

I’ve been thinking of a method of creating simple configuration UIs.

Take the following config file:
RunMode = Inetd
AuthMode = Closed
Restricted = true

To create a simple configuration GUI for this I would write something like this:
filename is /etc/example.conf
setting RUNMODE can be (Inetd, Daemon)
setting AUTHMODE can be (Closed, Open)
option RunMode is RUNMODE with name "Run mode" and tooltip "Which mode to run in"
option AuthMode is AUTHMODE with name "Authentication mode" and tooltip "Which mode to use for authentication"
option Restricted is BOOLEAN with name "Enable restriction" and tooltip "Enable this if you want to enable restriction of user rights"

The initial filename option selects which file the config file is.
The first “setting” defines a type of entry in the config file that can be either of the value “Inetd” or “Daemon”. This would create a drop-down widget where you can select “Inetd” and “Daemon”.
The second setting defines the same for “Closed” and “Open”.
The first “option” defines that the option in the config file “RunMode” is of the type “RUNMODE” and the name of the option that is displayed in the GUI is “Run mode” and it has a tooltip saying “Which mode to run in”
The second is the same.
The third one defines that the option “Restricted” is of the predefined type “BOOLEAN” (which is predefined to be true/false, this creates a checkbox instead of a drop-down box).

Now begin your slaughtering. This is still just an idea. There is no code yet. What do you think of the concept of creating a whole configuration GUI for an app using a single file like this? I’m thinking it would be okay for daemons and such.
What do you think of the syntax? I just grabbed it out of my head today and thought it might work. I want the syntax to be simple and human-readable. The point is that you should be able to hack together a GUI for any program with a simple configuration file in a few minutes.

Flame me.

5 Responses to “drakSimpleConf”

  1. AdamW Says:

    Simple question: what’s the point?

    You’re not making configuration any easier than editing the text file.

    The actual points of graphical configuration apps are automation (make choices for the user), simplification (remove choices that most people are not likely to need or want to make), and explanation (help the user to understand what choices mean). Something that just converts the text file to a series of drop down boxes without reducing the amount of choices or explaining them at all is not actually making things any easier for any users…

  2. Zero_Dogg Says:

    Naturally it would explain things more, which is the tooltip functionality.
    The points, as far as I can come up with now amount to:
    - You can’t really set a “wrong” option, as it forces you to only enter valid ones
    - A GUI can be much friendlier to newer users
    - It’s easier to point and click than open and type (though naturally, most geeks prefer the latter)

    You’d be allowed to not include certain options in the GUI config util for instance, reducing the number of options as you suggest.
    Maybe in time it’d be possible to include macros to auto-set certain options to something aswell.

    It’s just an idea (and might stay one if people are not interested).

  3. Ilya Says:

    Could be useful with some more features. For instance, to simplify and explain, grouping options in named tabs would help:
    group xxx
    setting …
    option …
    group yyy
    setting …
    option …

  4. boklm Says:

    It might be a good idea, or the begining of a good idea. Maybe it is possible to add some syntax for documentation, options for expert mode, automatic choices, etc …
    However, I’m not sure it would word for complexe configurations files.

  5. Zero_Dogg Says:

    Ilya:
    Yeah, I agree. Grouping would definetly be nice.

    boklm:
    Well, it all depends ofcourse. For files with “odd” methods of configuration (that is not either key=value or simply “option” (for instance an option could be enable-logging, where logging would be disabled if it wherent in the config file)) it would require additional coding. But for “simple” config files, no matter the size really, it could work.

Leave a Reply