Discovering ncurses, the GUI for the Linux Console - page 2
ncurses, a GUI for the Linux Console
It's entirely possible to run an ncurses-based program within a terminal running in an X environment. The main thing to bear in mind when doing this is that the ncurses mouse-handling overrides the X mouse-handling while the mouse pointer is within the window that the ncurses application is running in. So you can use the mouse to click on menus and links, but you can't (unless the program implements this itself) copy-and-paste using the normal X methods.
In terms of a straight comparison between ncurses and X as ways of providing a graphical interface, X certainly provides much more scope for things like moving between terminals, and cutting-and-pasting between terminals. Fundamentally, X provides a way of managing multiple windows within a desktop environment, and ncurses doesn't. screen, which uses part of the ncurses code, does provide multiple terminals within one session, which you can paste between, but you can't natively cut-and-paste between two separate instances of screen, or even use X to do this between ncurses programs in separate terminals.
ncurses applications are also less aesthetically pleasing, by and large, than X applications, due to the limitations imposed by operating within a terminal; they tend to look quite blocky and very text-based. The extent to which ncurses applications are GUI-like is more about their logic and internal navigation than it is about their aesthetics. However, this 'graphical logic' can be incredibly useful. Being able to use the mouse for browsing within w3m is useful; and being able to use a menu-driven system for configuring a new Linux kernel (with make menuconfig) is incredibly useful and makes the task significantly easier. (There is also an X kernel configuration tool available, but you don't always have X running when you're rebuilding a kernel!).
Even in a modern system, it's not necessarily the case that a full-on GUI will actually give you significant improvements. Depending on what you're doing, the graphical login of ncurses may be enough of an improvement over a text-only CLI; and ncurses applications are way more lightweight than X applications. Most importantly, they don't require you to be running an X server, which isn't always either desirable or practical.
If your focus is on aesthetic beauty, or you need a desktop-style environment, then by all means stick with X and regular GUIs. If you want ease-of-use and low overheads, and you're either not bothered about graphical bells and whistles, or running in a terminal or console environment, ncurses-based programs can make that terminal environment far more usable, fast, and productive.
- 1Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 2Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 3Linux 4.6 Charred Weasel adds USB 3.1 Support
- 4Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader
- 5Linux Top 3: KaOS 2016.04, TurnKey 14.1 and pfSense 2.3