ArticleslgStudy

science

Text-based user interface

Text-based user interface is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Text-based user interface rather than just read about it. In short: In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an early form of human–computer interaction, before the advent of bitmapped displays and modern conventional graphical user interfaces (GUIs). Like modern GUIs, they can use the enti…

Text-based user interface — main illustration
Text-based user interface — illustration

Key takeaways

  • Text-based user interface belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Text-based user interface to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Text-based user interface from memory before moving on to harder problems.

Reference excerpt

In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an early form of human–computer interaction, before the advent of bitmapped displays and modern conventional graphical user interfaces (GUIs). Like modern GUIs, they can use the entire screen area and may accept mouse and other inputs. They may also use color and often structure the display using box-drawing characters such as ┌ and ╣. The modern context of use is usually a terminal emulator.

Types of text terminals In the early years of computing, text terminals were usually keyboard/printer devices. Currently, however, keyboard/display devices dominate. A text screen (and communications with it) can belong to one of three types (here ordered in order of decreasing accessibility):

A local text mode display, controlled by a video adapter or the central processor itself. This is a normal condition for a locally running application on various types of personal computers and mobile devices. If not deterred by the operating system, a smart program may exploit the full power of a hardware text mode. A text mode emulator. Examples are TN3270, xterm for X Window System and win32 console (in a window mode) for Microsoft Windows. This usually supports programs that expect a real text mode display, but may run considerably slower. Certain functions of an advanced text mode, such as an own font uploading, almost certainly become unavailable. A remote text terminal. The communication capabilities usually become reduced to a serial line or its emulation, possibly with few ioctl()s as an out-of-band channel in such cases as Telnet and Secure Shell. This is the worst case, because software restrictions hinder the use of capabilities of a remote display device. From text application's point of view, the display type is determined by the API, e.g., curses, TPUT. Under Linux and other Unix-like systems, a program easily accommodates to any of the three cases because the same interface (namely, standard streams) controls the display and keyboard. See below for comparison to Windows. Many TUI programming libraries are available to help developers build TUI applications.

ANSI-compatible terminals American National Standards Institute (ANSI) standard ANSI X3.64 defines a standard set of escape sequences that can be used to drive terminals to create TUIs (see ANSI escape code). Escape sequences may be supported for all three cases mentioned in the above section, allowing arbitrary cursor movements and color changes. However, not all terminals follow this standard, and many non-compatible but functionally equivalent sequences exist.

MS-DOS and Windows

On IBM PC compatibles, the Basic Input Output System (BIOS) and MS-DOS system calls provide a way to write text on the screen, and the ANSI.SYS driver could process standard ANSI escape sequences. However, programmers soon learned that writing data directly to the screen buffer was far faster and simpler to program, and less error-prone; see VGA-compatible text mode for details. This change in programming methods resulted in many DOS TUI programs. The Windows console environment is notorious for its emulation of certain EGA/VGA text mode features, particularly random access to the text buffer, even if the application runs in a window. On the other hand, programs running under Windows (both native and DOS applications) have much less control of the display and keyboard than Linux and DOS programs can have, because of aforementioned Windows console layer.

A more precise cursor (per-pixel resolution) was achieved by regenerating the glyphs of characters used where the cursor was visible, at each mouse movement in real-time. Most often those programs used a blue background for the main screen, with white or yellow characters, although commonly they had also user color customization. They often used box-drawing characters in IBM's code page 437. Later, the interface became deeply influenced by graphical user interfaces (GUI), adding pull-down menus, overlapping windows, dialog boxes and GUI widgets operated by mnemonics or keyboard shortcuts. Soon mouse input was added – either at text resolution as a simple colored box or at graphical resolution thanks to the ability of the Enhanced Graphics Adapter (EGA) and Video Graphics Array (VGA) display adapters to redefine the text character shapes by software – providing additional functions. Some notable programs of this kind were Microsoft Word, DOS Shell, WordPerfect, Norton Commander, Turbo Vision based Borland Turbo Pascal and Turbo C (the latter included the conio library), Lotus 1-2-3 and many others. Some of these interfaces survived even during the Microsoft Windows 3.1x period in the early 1990s. For example, the Microsoft C 6.0 compiler, used to write true GUI programs under 16-bit Windows, still has its own TUI. Since its start, Microsoft Windows includes a console to display DOS software. Later versions added the Windows console as a native interface for command-line interface and TUI programs. The console usually opens in window mode, but it can be switched to full, true text mode screen and vice versa by pressing the Alt and Enter keys together. Full-screen mode is not available in Windows Vista and later, but may be used with some workarounds.

Windows Terminal is a multi-tabbed terminal emulator that Microsoft has developed for Windows 10 and later as a replacement for Windows Console. The Windows Subsystem for Linux which was added to Windows by Microsoft in 2019, supports running Linux text-based apps on Windows, within Windows console, Windows Terminal, and other Windows-based terminals.

Unix-like systems

… excerpt ends here. Continue reading the full article.

Illustrations

Text-based user interface: Some file managers implement a TUI (here: Midnight Commander)
Some file managers implement a TUI (here: Midnight Commander)
Text-based user interface: Vim is a very widely used TUI text editor.
Vim is a very widely used TUI text editor.
Text-based user interface: The FreeDOS Edit user interface
The FreeDOS Edit user interface
Text-based user interface: Mouse cursor in Impulse Tracker.
Mouse cursor in Impulse Tracker.
Text-based user interface: XFdrake, a TUI used in Mandriva Linux to configure the graphical system
XFdrake, a TUI used in Mandriva Linux to configure the graphical system

Worked examples

Example 1 — a first encounter with Text-based user interface

Start with the simplest possible case. Write down what Text-based user interface claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Text-based user interface before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Text-based user interface ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Text-based user interface

In research
Text-based user interface appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Text-based user interface in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Text-based user interface is common in secondary-school and first-year university syllabi. It links to neighbouring topics Text user interface, User interfaces, so understanding it makes those chapters shorter.
In everyday life
Look for Text-based user interface outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Text-based user interface” →

How to study Text-based user interface in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Text-based user interface means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Text-based user interface out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Text-based user interface in simple terms?

In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an early form of human–computer interaction, before the advent…

Why does Text-based user interface matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Text-based user interface?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Text-based user interface.

Tags

  • Text user interface
  • User interfaces

Keep exploring