David Johnson david at
Mon Jun 7 01:28:19 GMT 2004

On Sunday 06 June 2004 02:50 am, Jonathan Belson wrote:

> I notice that DragonFlyBSD has made some progress on their NG
> installer. There's some information about its design here:

Reading through the page, this general design is straight forward, but 
the specifics are dependent upon DragonFly's libcaps, which FreeBSD 
does not have. So this doesn't look like something we can grab "as is" 
from DragonFly, without first importing libcaps and its messaging 

> Using or building on an existing UI abstraction would save a lot of
> work. The Linux installers I've looked at seem to use separate code
> for each type of front-end (eg. console, gui), but having a common
> API would have advantages.

I've been thinking about this for quite some time, and tried to rough 
out some designs. The hardest thing to write is this generic UI 
abstraction. The fact that no one has done it successfully before means 
that it's probably not worth the effort. What does exist is at a much 
higher level (dldialog). Trying to map one GUI API onto another is 
extremely problematic. Even writing an API to match another (for 
example a ncurses API that matches the Qt or GTK+ API) will cause 
problems mapping character based UI concepts onto pixel based UI 

I think the Linux distros have the right idea with their installers. 
Have a common backend, but write separate UI frontends. This still 
leaves considerable opportunities for common code. Only the actual UI 
need be written twice (or three times).

I am currently getting some other projects of mine updated and out of 
the way so I can work on this in the near future. Here's my basic idea: 
Make the backend a shared library (libh, for example). It should 
contain all of the real functionality, as well as any common code such 
as saving/loading configuration sets or profiles. Around this should be 
a basic command line interface. If there are existing utilties that do 
what we want (such as useradd), then this library would merely provide 
a thin wrapper to it. Then a text front end could be written in tvision 
or ncurses, and a graphic in Qt or GTK+. Even a CGI wrapper should be 

I'm planning on writing a protype of this idea using just the 
functionality contained within the existing "useradd" utility. I've 
also thought about writing a higher level ncurses toolkit, since I'm 
not particularly enamored of the tvision look and feel, but that's 
secondary to doing a prototype. It's probably going to be a couple of 
months until I get the spare time to devote to it though.

David Johnson

More information about the freebsd-libh mailing list