13

I've been doing a lot of installs lately, and when possible I usually opt for the text install from the Live CD's GRUB menu. Most installers looks like this:

enter image description here

I always thought these GUIs (if you can call them as such) were really awesome and lightweight. Seeing as a lot of applications/distros use them, it must be a shared library or something right? Is there a way I can make stuff like this?

  • It should be noted that most of the sysinstallers for linux & bsd have horrible user interface presentation using curses regarding the OK and Cancel buttons: it's rarely clear when the user has highlighted them. When implementing with curses it's best not to use those installers as a design example; go back to review those old DOS programs instead, like Lotus 123, for how good ANSI graphics GUIs should work in terms of UI. It's something like: [Ok] is lightly colored but not highlighted, until selected by the user. – Jonathan Cline IEEE Sep 1 '11 at 23:31
18

You are looking for ncurses.

  • 2
    Reading back I ask myself what exactly "hitting the money means"... I guess I was just excited. – n0pe Aug 30 '11 at 18:43
  • 3
    @MaxMackie: Now that follow-up question would be better suited for english.stackexchange.com ;) – Piskvor Aug 30 '11 at 19:04
14

I don't know about Arch and Debian, but oftentimes those GUIs are made with dialog(1), which takes a bunch of command-line arguments and then renders a dialog with ncurses. For examples, the Linux kernel menuconfig looks like this:

Screenshot of menuconfig

An example dialog usage is:

$ dialog --title "Hello" --infobox "Hello there Unix and Linux Stack Exchange" 20 100

Which results in:

Screenshot of dialog(1)

  • This is pure awesome, so dialog uses ncurses to draw to the terminal? Couldn't be easier than that. Thanks – n0pe Aug 31 '11 at 2:10
8

At a higher level, the ones that look exactly like that generally use something like newt/whiptail or dialog. That particular one looks like it's newt/whiptail, since dialog tends to draw a frame around controls like that listbox. For another example, the linux kernel config uses a cut-down custom version of dialog (without extra features it doesn't use, and I would imagine the yes/no/module checkbox is a custom feature)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.