Skip navigation.
KDE Developer's Journals

On the virtues of a common configuration system

zogje's picture

Yesterday, Aaron made some interesting comments on the unified configuration system that has been discussed on the xdg-list over the last few weeks. I think some of his comments are spot on, unfortunately some others seem to be of the more paranoid hallucinogenic kind. I'm not into mushrooms myself so I will concentrate on the productive parts.

Let me start by pointing out that the discussion on the xdg-list is lively and ongoing. In my view there is an overall concensus among the participants of the discussion that it would be beneficial to have a common configuration system in place on Linux, what keeps the discussion going is the question how such configuration system should look like and how to get there. If you think you have anything to contribute in this area, by all means, join the fun.

For the sake of discussion this future configuration system has been dubbed D-Conf. Aaron describes D-Conf as vapourware, which is true of course, the challenge though is to model the vapour into a shape of our liking and then put in some honest work, sweat and tears to turn vapour into reality. Not all the participants in the discussion have the same amount of experience with configuration systems so it is important to make sure that the vapour doesn't end up like some bad trip, that would be a shame because such a system, once implemented, would be unlikely to find adoption in either KDE or Gnome.

In his blog entry, Aaron characterizes D-Conf as an effort to create the One True Unix Config File Format. I think that misses the point. Although file formats have certainly been discussed, they are not terribly interesting. What is interesting, is to have a One True Unix Configuration System. One true way to access and manage configuration settings. There is already One True KDE Configuration System, it is called KConfig. It uses an enhanced .ini-style storage format and was initially designed to support multiple different storage format. Although hardly anyone bothered over the years to come up with an alternative storage format, it should still be relative straight forward to add one. There is also the One True Gnome Configuration System which is called G-Conf. It uses an XML-based storage format and was designed to support multiple different storage formats. When you have a configuration system like KConfig or G-Conf in place and have applications using it, the storage format isn't that big of a deal... when you need something else, it's easy enough to add a different storage format. The internal design of the system is important though. It would, for example, be easy to add an XML backend to KConfig, but due to the internal design of KConfig it would be impossible at the moment to let applications take full advantage of the extra flexibility offered by XML.

Aaron makes two very interesting point when he writes "people need to realize that a new configuration system should do more and be better than what's there. so actually talk to the people making these systems." The first part can't be stressed enough, it makes no sense to design a new system if it doesn't do a better job than existing systems. The second part follows from the first because without the expertise of the the people that worked on the existing systems you are bound to repeat the failures instead of the successes. Luckily both Havoc, the lead developer of G-Conf, and me, maintainer of KConfig, are subscribed to the xdg list Smiling

Havoc has outlined here what he thinks is currently lacking
in G-Conf.

At the KConfig side I am aware of the following wishes from KDE developers:
* Change notification
* Nested groups (if only to make khotkeysrc readable for humans)
And a recurring wish from KDE users:
* LDAP storage backend (or any remote storage)

If there are other things that you miss in KConfig don't hesitate to let me know.

I think that D-Conf creates a great opportunity to work together and improve both G-Conf and KConfig. Especially because the plans for G-Conf will make G-Conf more like KConfig, and in order to implement the above wishlist for KConfig, we will need to make KConfig more like G-Conf. I think we can create D-Conf that solves the needs of both G-Conf and KConfig and at the same time establish the elusive One True Unix Configuration System

Although I think the journey to D-Conf land will be an exciting journey I realize that many people are very happy with KDE's configuration system today and it is absolutely essential to keep it that way. That means that for D-Conf to be a success KDE developers must be able to continue to use KConfig as they do today and it means that KDE users must be able to continue to use their carefully tuned configuration as they do today. I think it's possible to do that and I hope that KDE developers will join me on this journey.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
segedunum's picture

It's Much More than Just KDE, Gnome and Standards

I don't think anyone is being paranoid - you can't push things because someone has defined them as being a standard when they don't actually make anything better. Just think. Is an all-new new config system really going to make things any better, or is it just a case of re-inventing something for the purposes of being a standard when competitors continue to move off into the distance? What will this config system do? What will it accomplish? Will it be system-wide, beyond KDE and Gnome and any desktop? Get these things nailed down. That's a number one primary reason for all the noise going on.

Freedesktop can undoubtedly be a critical part of the free Unix Desktop's (or indeed, the Unix system) future. But, in many ways (at the moment) it is no different to all of those Unix standards bodies that got too far up their own backside in the past and pretty much handed desktop domination to you-know-who. Please, try and make sure that more nails aren't put in that particular coffin. Design by committee is a really bad idea when you aren't nailing down exactly what it is you want and certain people cannot accept that their pet project will not be accepted in its entirety. The Unix world has been through this "Yes, this may be a much better way of doing things but we have a standards body which dictates all of this stuff" crap before, and this is so similar to the eighties and nineties I can't quite believe it. Please, just don't do it. Note that this isn't finger pointing at Waldo or anyone in particular, but just generally from painful things that have happened in the past.

I know Freedesktop is called Freedesktop, but the stuff being talked about actually goes beyond the desktop. Certainly, DConf as a concept would be of major interest to server oriented open source projects, and people have pointed out that the Samba people as part of version 4 are trying to tackle many configuration issues. Presumably Apache and other major projects would have the same issues and similar experience that they can share. Coming up with a config system on your own and then hoping that these projects will somehow accept it later (hint - they won't) is just getting your carts and horses mixed up.

There is a world beyond KConfig and GConf that should really be embraced. Don't just say "Come to the XDG list", but ask these projects (get on their mailing lists) what they think about a Unified Unix Config System. This really does end up implying a unified file format though (I can understand the dilemma of Freedesktop, as how do you have standards unless you can prove them through implementations?). What would these projects want from such a system and how would they use it? Everybody depends on everybody else in the open source world, and there may be some surprising and productive answers. With people like Waldo and Havoc working for such major companies, I can't believe that there aren't people that they know who they can have informal discussions with. I don't know how a unified config system will help there though, as it is possible to have things that are incompatible even when you're all using the same system!

It's extremely easy to catch the standards bug, work inside your own sphere and think quite clearly that nothing is wrong. Unix and open source software? Been there and got the T-shirt, and that's unfortunately why I (and an awful lot of others) am not using any open source software for this one particular job I'm doing right now (not my choice in this particular case, but that's the way things have gone) or widely at all in the world today.

Just be careful. I don't think anyone need lose faith in Freedesktop, but people should get physically around a table and talk rationally about what they want it to be and what stuff like DConf should accomplish. This is a classic failure that people take as a sign of the end and Doomsday when it isn't really. They just don't work out what they want, what they were thinking of to start off with and where they want to go. If you identify those things correctly and get together then you've got a chance (think of the KDE APPEAL stuff, a really good start I think).

suy's picture

My missed features

If there are other things that you miss in KConfig don’t hesitate to let me know.

As a developer, I don't have any extra needs to what KConfig provides right now (I recognize that my apps are very simple, though). But as a user, I will would really like a kind of tool that supports exporting and importing some selected configuration options, and data. That will make very easy to make backups of the configuration, and share some of them between, for example, a desktop computer, and a laptop.

Something that actually is a PITA, is have in sync my IRC and IM logs, when I change between two machines. I've put symlinks inside some places of ~/.kde/, so some files are in the same place, and I can use rsync in this directory. Also, a common situation in the mailing lists I read, is when someone misconfigures something, and is not able to solve it. The most usual solution, is grep inside the configuration directory, and delete the related files, starting to configure the application from zero. Some people, including myself Smiling, don't understand why the configuration of an application is splitted between ~/.kde/share/apps/kfoobar and ~/.kde/share/config/kfoobarrc.

aseigo's picture

sidestepping

the issue is not whether a common config system is good. of course it is.

nor is the question whether we need desktop standards. of course we do.

the question is whether FreeDesktop.org is going about it in a productive manner that will result in the best technology possible and makes adoption easy to achieve. i'm concerned for the future of FreeDesktop.org due to the way those involved are deciding to operate it. i don't want to see FreeDesktop.org become irrelevant, but i see that as a distinct possibility with the unnecessarily risky and politically blind pathways it's currently choosing.

aseigo's picture

oh, and...

... if you wish to know what i mean by that, i've blogged about it; i won't repost it here and spam zogje's blog. =)

zander's picture

Soo.. No other experts needed, heh..

Your Blog (being an answer to Aarons) can be summed up in one sentence; "we have the gconf and the kconfig hackers on board; so don't worry!"

If you really think that configuration experts from samba (to repeat Aarons point) or cups or whatever are not needed to make a standard you kind of expect them to start using one day in the future, well then you just proved Aarons point. How ironic.

Yeah; its hard to actively seek out experts in their native habitat and I really hope that laziness is the only reason that has not been done yet since the only other option is ineptitude.

cristian tibirna's picture

config formats (again :-( )

> * Nested groups (if only to make khotkeysrc readable for humans)
YAML http://www.yaml.org/

NIH of course.

rich's picture

Sorry, I'm not convinced

called KConfig. It uses an enhanced .ini-style storage format and was initially designed to support multiple different storage format.

Actually support multiple backends was a later addition (around KDE 2 IIRC).

it would be impossible at the moment to let applications take full advantage of the extra flexibility offered by XML

I personally think this is a good thing. We neither want nor need the flexibility of XML in this context. XML is great for lots of things, but I think it is a poor choice for the sort of configuration files we use in KDE. Even XMLGUI suffers from appalling documentation, inconsistent usage and incomprehensible sideeffects - adding the same problems to the rest of the configuration system would be foolish.


* Change notification
* Nested groups (if only to make khotkeysrc readable for humans)
And a recurring wish from KDE users:
* LDAP storage backend (or any remote storage)

All these are useful, though I am not convinced about the LDAP idea.

I think that D-Conf creates a great opportunity to work together and improve both G-Conf and KConfig.

I do not think this is a good aim. The aim should be to make KConfig better, if it turns out that working together with Gnome is a useful side-effect then so be it, but that should not be the goal.

I think we can create D-Conf that solves the needs of both G-Conf and KConfig and at the same time establish the elusive One True Unix Configuration System

I seriously doubt this. I think the requirements for things like initrc scripts, inittab etc. are quite different from those of applications that run higher up the system.

I have more to say on the XDG stuff, but I think separate blog post is a better way to do that. In short though, I am disappointed at the way XDG is going and have less and less faith in its ability to deliver acceptable solutions.

zogje's picture

We neither want nor need the

We neither want nor need the flexibility of XML in this context.



Yes, you don't want just XML as configuration format, that would be like saying "we want the flexibility of ASCII". You want to have XML with additional contraints. (Compare the XML based .kcfg schemas of KConfigXT) But a nice aspect of XML is that it is better able to represent structure, that's something that applications developers have asked for and that's something that would be nice to take advantage of. Unfortunately that's also something that the KConfig isn't able to represent very well at the moment.



It's straightforward to make a XML backend for KConfig that is limited to 1-level groups, but that doesn't give you any advantage at the application side.



All these are useful, though I am not convinced about the LDAP idea.



No, me neither, I don't think LDAP is suitable for relatively large amounts of configuration data, maybe the Samba LDB stuff works better in that regard, I hope that Ian Geiser can provide some insight into that, since he seems to be looking into it. The problem that I see is the ability to retrieve a lot of keys relatively fast, if you get a network round trip for every config key you have to fetch your KDE desktop will take ages to start up.



I guess I should generate some data points for that so that we have a number that we can talk about.



The aim should be to make KConfig better, if it turns out that working together with Gnome is a useful side-effect then so be it, but that should not be the goal.



I think there is intrinsic value in having a shared configuration system between Gnome and KDE.

  1. It will make it easier for our users to switch _ALL_ their applications to some sort of remote configuration storage (assuming we get OpenOffice.org and Mozilla on board as well)
  2. It will make it much easier to share selected configuration settings between the two dektop environments, so that users no longer have to wonder why, if they make a change in the control center, only half of their applications respond to that change.

I think the requirements for things like initrc scripts, inittab etc. are quite different from those of applications that run higher up the system.



Yes, somewhat, so for now I think it's best to concentrate on the latter.

bgmilne's picture

LDAP won't be the performance inhibitor ...

All these are useful, though I am not convinced about the LDAP idea.

Well, then you may want to review the comments in bug 101716, since this is being implemented ...


No, me neither, I don't think LDAP is suitable for relatively large amounts of configuration data,

Of course, LDAP is a protocol. Is there a better networked protocol to use to search for configuration data?


maybe the Samba LDB stuff works better in that regard

LDB is just an LDAP-like interface to an sqlite db ... and it's main reason for existence is the fact that the samba developers believed OpenLDAP was too difficult to configure ... but it seems the config backend in OpenLDAP 2.3 has probably already solved that a different way.

Samba4 will still be able to use other LDAP servers, and I suspect most large-scale deployments (which would most likely be the people interested in network storage for desktop settings) will use OpenLDAP or similar.


The problem that I see is the ability to retrieve a lot of keys relatively fast, if you get a network round trip for every config key you have to fetch your KDE desktop will take ages to start up.

This is more an issue for the client implementation, since with a good schema design, indexing, and at least some LDAP server tuning, it should be possible to retrieve settings for any one application (or, if KConfig allows it) all applications in one search, or if some kind of global/per-group/per-user support is added, one search per basedn searched on.

For example, we're doing prototyping, and will be testing with kcalc initially:
$ time ldapsearch -x -LLL -h ra -b dc=obsidian,dc=co,dc=za "(&(objectclass=appConfigSection)(appname=kcalcrc))" cn appname appconfigentry
dn: cn=Colors,cn=kcalcrc,ou=Config,dc=obsidian,dc=co,dc=za
cn: Colors
appname: kcalcrc
appconfigentry: BackColor=189,255,180
appconfigentry: ForeColor=0,0,0
appconfigentry: FunctionButtonsColor=230,231,230
appconfigentry: HexButtonsColor=230,231,230
appconfigentry: MemoryButtonsColor=230,231,230
appconfigentry: NumberButtonsColor=230,231,230
appconfigentry: OperationButtonsColor=230,231,230

dn: cn=Font,cn=kcalcrc,ou=Config,dc=obsidian,dc=co,dc=za
cn: Font
appname: kcalcrc
appconfigentry: Font=helvetica,14,-1,5,75,0,0,0,0,0

0.00user 0.00system 0:00.00elapsed 33%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+464minor)pagefaults 0swaps

(the server this is against isn't even indexing relevant attributes yet ... since we had to change servers recently).

So, the fact that KConfig is instantiated 32 times during kcalc startup may be more of a performance issue than the actual LDAP issues.

Well have some real numbers in a few days hopefully (ie difference in application startup time when using LDAP vs not).

zander's picture

XML

    I personally think this is a good thing. We neither want nor need the flexibility of XML in this context. XML is great for lots of things, but I think it is a poor choice for the sort of configuration files we use in KDE. Even XMLGUI suffers from appalling documentation, inconsistent usage and incomprehensible sideeffects - adding the same problems to the rest of the configuration system would be foolish.

I personally disagree with the XMLGui part; if you can read a dtd then the documentation is sufficient.


What I agree on is that XML is just a easy way out for a lot of problems where you basically create a whole lot of new problems to replace your old ones.

XML is just a really poor choice for hand-editing using your favorite text editor. Reason: it takes to much training on the user side. For example; how many people know that a tag named 'desktopSharing' is different from a tag named DesktopSharing ?


Additionally; I have yet to see a good XML library that is usable from c all the way up to haskell, which additionally gives very reasonable human-readable error messages in case the user missed a '/' somewhere.



No, XML just simply adds too much complexity for the majority of config files.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.