Terminal emulator
This article needs additional citations for verification. (October 2009) |
A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces. A terminal emulator inside a graphical user interface is often called a terminal window.
A terminal window allows the user access to a text terminal and all its applications such as command-line interfaces (CLI) and text user interface (TUI) applications. These may be running either on the same machine or on a different one via telnet, ssh, dial-up, or over a direct serial connection. On Unix-like operating systems, it is common to have one or more terminal windows connected to the local machine.
Terminals usually support a set of escape sequences for controlling color, cursor position, etc. Examples include the family of terminal control sequence standards known as ECMA-48, ANSI X3.64 or ISO/IEC 6429.
Background
[edit]In the early days of computing, with the advent of interactive computing, the prevailing model involved a central computer connected to multiple terminals.[1] This configuration, known as the centralized or mainframe model, featured a powerful central computer that performed all the processing tasks, while terminals served as input/output devices for users to interact with the system. These systems were initially character based.
Character-oriented terminals
[edit]A character-oriented terminal is a type of computer terminal that communicates with its host one character at a time, as opposed to a block-oriented terminal that communicates in blocks of data. It is the most common type of data terminal, because it is easy to implement and program. Connection to the mainframe computer or terminal server is achieved via RS-232 serial links, Ethernet or other proprietary protocols.
Character-oriented terminals can be "dumb" or "smart". Dumb terminals[2] are those that can interpret a limited number of control codes (CR, LF, etc.) but do not have the ability to process special escape sequences that perform functions such as clearing a line, clearing the screen, or controlling cursor position. In this context dumb terminals are sometimes dubbed glass Teletypes, for they essentially have the same limited functionality as does a mechanical Teletype. This type of dumb terminal is still supported on modern Unix-like systems by setting the environment variableTERM
to dumb
. Smart or intelligent terminals are those that also have the ability to process escape sequences, in particular the VT52, VT100 or ANSI escape sequences.Emulators
[edit]When personal computers became ubiquitous in the 1980s, they offered the option of running software on the user's personal computer, providing an opportunity to replace the expensive and space consuming hardware terminals with something that had additional functions.[3] Immediately software became available, that could emulate the functions of the hardware terminals on a PC. Examples of such software for DOS were Telix or Telemate, which was published in 1988 and could emulate a DEC VT102 terminal.[4]
Workstations, usually running versions of Unix, also became common in the 1980s. Unix systems usually provided access to the command line with locally-attached or dial-up terminals. Unix workstations were designed to be used primarily through a graphical user interface (GUI); to provide access to the command line, the GUI included terminal emulator applications that behaved like locally-attached terminals.
During the 1990s, new operating systems like Windows and OS/2 arrived, providing the technical background for more terminal emulators like Telix for Windows, ZOC for OS/2, or PuTTY, which was initially released for Windows in 1998 and which (together with its derivates) is still one a very popular choice to this day.[5]
Through the success of Linux, especially running on data centers and cloud servers,[6][dead link] the necessity of accessing remote computers through character based terminals remains. This is evident in the fact, that today lists of terminal emulators that could serve as alternative to the aforementioned PuTTY offers over 100 alternatives.[7][dubious – discuss]
Examples of terminals emulated
[edit]Many terminal emulators have been developed for terminals such as VT52, VT100, VT220, VT320, IBM 3270/8/9/E, IBM 5250, IBM 3179G, Data General D211, Hewlett-Packard HP700/92, Sperry/Unisys 2000-series UTS60, Burroughs/Unisys A-series T27/TD830/ET1100, ADDS ViewPoint, Sun console, QNX, AT386, SCO-ANSI, SNI 97801, Televideo, and Wyse 50/60. Additionally, programs have been developed to emulate other terminal emulators such as xterm and assorted console terminals (e.g., for Linux). Finally, some emulators simply refer to a standard, such as ANSI. Such programs are available on many platforms ranging from DOS and Unix to Windows and macOS to embedded operating systems found in cellphones and industrial hardware.
Implementation details
[edit]Unix-like systems
[edit]In the past, Unix and Unix-like systems used serial port devices such as RS-232 ports, and provided /dev/*
device files for them.[8]
With terminal emulators those device files are emulated by using a pair of pseudoterminal devices. This pair is used to emulate a physical port/connection to the host computing endpoint - computer's hardware provided by operating system APIs, some other software like rlogin, telnet or SSH or else.[9] For example, in Linux systems these would be /dev/ptyp0
(for the master side) and /dev/ttyp0
(for the slave side) pseudoterminal devices respectively.
There are also special virtual console files like /dev/console
. In text mode, writing to the file displays text on the virtual console and reading from the file returns text the user writes to the virtual console. As with other text terminals, there are also special escape sequences, control characters and functions that a program can use, most easily via a library such as ncurses. For more complex operations, the programs can use console and terminal special ioctl system calls. One can compare devices using the patterns vcs ("virtual console screen") and vcsa ("virtual console screen with attributes") such as /dev/vcs1
and /dev/vcsa1
.[10]
Some terminal emulators also include escape sequences for configuring the behavior of the terminal to facilitate good interoperation between the terminal and programs running inside of it, for example to configure paste bracketing.
The virtual consoles can be configured in the file /etc/inittab
read by init -- typically it starts the text mode login process getty for several virtual consoles. X Window System can be configured in /etc/inittab
or by an X display manager. A number of Linux distributions use systemd instead of init, which also allows virtual console configuration.
CLI tools
[edit]Typical Linux system programs used to access the virtual consoles include:
chvt
to switch the current virtual consoleopenvt
to run a program on a new virtual consoledeallocvt
to close a currently unused virtual console
Local echo
[edit]Terminal emulators may implement a local echo function, which may erroneously be named "half-duplex", or still slightly incorrectly "echoplex" (which is formally an error detection mechanism rather than an input display option).[11][12][13][14]
Line-at-a-time mode/Local editing
[edit]Terminal emulators may implement local editing, also known as "line-at-a-time mode". This is also mistakenly referred to as "half-duplex".[citation needed] In this mode, the terminal emulator only sends complete lines of input to the host system. The user enters and edits a line, but it is held locally within the terminal emulator as it is being edited. It is not transmitted until the user signals its completion, usually with the ↵ Enter key on the keyboard or a "send" button of some sort in the user interface. At that point, the entire line is transmitted. Line-at-a-time mode implies local echo, since otherwise the user will not be able to see the line as it is being edited and constructed.[11][15] However, line-at-a-time mode is independent of echo mode and does not require local echo. When entering a password, for example, line-at-a-time entry with local editing is possible, but local echo is turned off (otherwise the password would be displayed).[16]
The complexities of line-at-a-time mode are exemplified by the line-at-a-time mode option in the telnet protocol. To implement it correctly, the Network Virtual Terminal implementation provided by the terminal emulator program must be capable of recognizing and properly dealing with "interrupt" and "abort" events that arrive in the middle of locally editing a line.[17]
Synchronous terminals
[edit]This section possibly contains original research. (January 2011) |
In asynchronous terminals data can flow in any direction at any time. In synchronous terminals a protocol controls who may send data when. IBM 3270-based terminals used with IBM mainframe computers are an example of synchronous terminals. They operate in an essentially "screen-at-a-time" mode (also known as block mode). Users can make numerous changes to a page, before submitting the updated screen to the remote machine as a single action.
Terminal emulators that simulate the 3270 protocol are available for most operating systems, for use both by those administering systems such as the z9, as well as those using the corresponding applications such as CICS.
Other examples of synchronous terminals include the IBM 5250, ICL 7561, Honeywell Bull VIP7800 and Hewlett-Packard 700/92.
Virtual consoles
[edit]Virtual consoles, also called virtual terminals, are emulated text terminals, using the keyboard and monitor of a personal computer or workstation. The word "text" is key since virtual consoles are not GUI terminals and they do not run inside a graphical interface. Virtual consoles are found on most Unix-like systems. They are primarily used to access and interact with servers, without using a graphical desktop environment.
See also
[edit]- Binary Synchronous Communications
- List of terminal emulators
- Online service provider
- Serial interface
- Terminal multiplexer
Notes
[edit]- ^ FU Berlin, 3. Minicomputer architecture
- ^ "What is dumb terminal? definition and meaning". BusinessDictionary.com. Archived from the original on August 13, 2020. Retrieved March 13, 2019.
- ^ "Emulating a Terminal on Personal Computers".
- ^ "Telemate Wiki".
- ^ "SSH Clients for Windows".
- ^ "Powering Linux in the Data-Center".
- ^ "Alternatives to Putty".
- ^ "A Brief History of Terminal Emulation | Turbosoft". www.ttwin.com. Retrieved 2021-10-04.
- ^ "Ubuntu Manpage: tty — general terminal interface". manpages.ubuntu.com. Retrieved 2021-10-04.
- ^ "Screen dumps". The Linux keyboard and console HOWTO. The Linux Documentation Project. Retrieved 2008-07-31.
The current contents of the screen of /dev/ttyN can be accessed using the device /dev/vcsN (where `vcs' stands for `virtual console screen'). [...] From a program it is usually better to use /dev/vcsaN (`virtual console screen with attributes') instead - it starts with a header giving the number of rows and columns and the location of the cursor. See vcs(4).
- ^ a b Daintith 2004, p. 171.
- ^ Weik 2000, "echo" p. 478.
- ^ Weik 2000, "echoplex" p. 479.
- ^ Weik 2000, "echoplex mode" p. 479.
- ^ Bangia 2010, p. 324.
- ^ Stevens & Wright 1994, p. 413.
- ^ Miller 2009, p. 590, 591.
References
[edit]- Bangia, Ramesh (2010). "line mode terminal". Dictionary of Information Technology. Laxmi Publications, Ltd. ISBN 978-93-8029-815-3.
- Daintith, John (2004). "echo". Oxford dictionary of computing (5th ed.). Oxford University Press. ISBN 978-0-19-860877-6.
- Miller, Philip M. (2009). TCP/IP – The Ultimate Protocol Guide. Vol. 2–Applications, Access and Data Security. Universal-Publishers. ISBN 978-1-59942-493-4.
- Stevens, W. Richard; Wright, Gary R. (1994). TCP/IP illustrated. Addison-Wesley professional computing series. Vol. 1: The protocols. Addison-Wesley. ISBN 978-0-201-63346-7.
- Weik, Martin H. (2000). Computer Science and Communications Dictionary. Vol. 1. Springer. ISBN 978-0-7923-8425-0.
{{cite encyclopedia}}
: Missing or empty|title=
(help)
External links
[edit]- Terminal Emulation at Curlie
- Terminal Window Definition by The Linux Information Project (LINFO)