views:

313

answers:

8

Hi, How to make a Linux program in the Command Line Interface who display a nice user interface?

For example when I use "wget" to download a file from internet, I can see the download avancement in the Command Line Interface.
How can I do that ?

Thank's Martin Magakian

+3  A: 

Take a look at curses. It is a library for text based UI.

Brian Rasmussen
+4  A: 

ncurses is a popular option, there are APIs for lots of programming languages.

David Dorward
A: 

I wouldn't call wget's progress report as a 'nice gui', but anyway, the classic library for building graphical interfaces without X Windows is Linux and UNIX systems is ncurses.

Recently a C# version of ncurses has been started, check out details here

axel_c
A: 

If you're using Mono, you could use MonoCurses

madgnome
A: 

Try curses, it is a well documented API for text based UI.Also, there is so much open source projects that are using curses for you see and learn

Lucas
A: 

You can get a basic interface by using \r to go to the beginning of the current line.

Slightly more advanced is ncurses.

The next step up is Newt.

Ignacio Vazquez-Abrams
A: 

wget does not really have a GUI, all I see is stuff that you can already achieve using stdout and echos (e.g. printf() or std::cout)

Anyways, for simple dialog boxes of the MessageBox kind, but not limited to that, also have a look at dialog

phresnel
A: 

If you want to do a GUI for Bash scripts or to wrap around other command line utilities, you can use dialog (man page).

Here two great dialog tutorial to get you started :

Laurent Parenteau