Prev | Current Page 185 | Next

Chris Tyler

"X Power Tools"


Many applications have been written with a character-based interface intended for
use with a terminal. Standard utilities such as cp, mv, and ls, and server programs
such as Apache just write plain text to standard output and standard error; other
programs??”including many editors (vi, Emacs, Joe, and Pico) and applications such
as Midnight Commander and Pine??”take over the full terminal screen, sending
sequences of control characters to position text and control the display attributes.
These full-screen programs use a curses library, which looks up the terminal type in a
database to determine its capabilities, the codes used to control those capabilities,
and the special codes that may be received from the keyboard (for example, when a
function key is pressed). The terminal type is retrieved from the environment variable
TERM.
In addition to controlling the terminal using curses, character applications also control
the characteristics of the serial line connected to the terminal, such as whether
characters that are typed are echoed back to the display (which is the case when
using a shell) or not (when entering a password). These attributes are configured
using the operating system??™s termios interface.


Pages:
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197