diff --git a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml index 73323a2d..45a92763 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml @@ -4388,7 +4388,7 @@ implementation, plus auxiliary packages like Ghostscript. Text-Terminal-HOWTO, Text-Terminal HOWTO -Updated: Aug 2006. +Updated: Dec 2006. Explains what text terminals are, how they work, how to install and configure them, and provides some info on how to repair them. diff --git a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml index 050a4a8e..82cbc8aa 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml @@ -276,7 +276,7 @@ a Psion palmtop. Text-Terminal-HOWTO, Text-Terminal HOWTO -Updated: Aug 2006. +Updated: Dec 2006. Explains what text terminals are, how they work, how to install and configure them, and provides some info on how to repair them. diff --git a/LDP/howto/linuxdoc/Text-Terminal-HOWTO.sgml b/LDP/howto/linuxdoc/Text-Terminal-HOWTO.sgml index 626fe571..206b46f6 100644 --- a/LDP/howto/linuxdoc/Text-Terminal-HOWTO.sgml +++ b/LDP/howto/linuxdoc/Text-Terminal-HOWTO.sgml @@ -2,10 +2,15 @@
Text-Terminal-HOWTO <author> David S. Lawyer <url url="mailto:dave@lafn.org"> -<date> v1.39, August 2006 +<date> v1.40 December 2006 <!-- Change log +v1.40 Dec. 2006 Picocom is like minicom. Devfs obsolete so removed + tts/1, etc. Updated pseudo terminals. More about telnet, ssh, and + non-serial port interfaces. IBM terminal emulation over telnet. + Kermit for MS does terminal emulation. Ports of minicom to Mac. + Fixed/removed broken links. "reset" is an alias for "tset" v1.39 Aug. 2006 Typo your -> you're; Termcap Manual = Termcap Library; Fixed several broken links. Found link to mapchan program. v1.38 Feb. 2006 Fixed typos "the the" @@ -114,10 +119,9 @@ v0.00 April 1998: After reading it over on hikes in Griffith Park and This document explains what text terminals are, how they work, how to install and configure them, and provides some info on how to repair them. If you don't have a terminal manual, it may be of help. While -it's written for real terminals on a Linux system, much of it is also -applicable to terminal emulation and may be helpful for non-Linux -systems. </abstract> -<toc> +it was originally written for real terminals on a Linux system, much +of it is also applicable to terminal emulation and may be helpful for +non-Linux systems. </abstract> <toc> <sect> Introduction <label id="intro"> @@ -126,7 +130,7 @@ name="Quick Install">. <sect1> Copyright, Trademarks, Disclaimer, & Credits <sect2> Copyright -<p> Copyright 1998-2004 by David S. Lawyer.<url url="mailto:dave@lafn.org"> +<p> Copyright 1998-2007 by David S. Lawyer.<url url="mailto:dave@lafn.org"> <!-- license.D begin --> Please freely copy and distribute (sell or give away) this document @@ -162,14 +166,15 @@ respective owners. <!-- license.D end --> <sect2> Credits -<p> Much of the section "Physical Connection" is from Serial-HOWTO v. -1.11 (1997) by Greg Hankins (with his permission). His "How Do I Set -Up A Terminal Connected To My PC?" was incorporated into v1.00 at -various places. v1.09 has about 25 changes (and error corrections) -suggested by Alessandro Rubini who reviewed this HOWTO. Jeremy Jon -Spykerman told me about using a keyboardless terminal as a console for -a monitorless PC (using ttysnoop). In 2001 (v1.26) I fixed about 25 -typos, etc. found by Alain Cochard: +<p> +Greg Hankin's Serial-HOWTO v.1.11 (1997) section "How Do I Set Up A +Terminal Connected To My PC?" was incorporated into v1.00 at various +places (with Greg's permission). v1.09 has about 25 changes (and +error corrections) suggested by Alessandro Rubini who reviewed this +terminal as a console for a monitorless PC (using ttysnoop). In 2001 +(v1.26) I fixed about 25 typos, etc. found by Alain Cochard. Numerous +other people have made a suggestion or two or found a few typos. +Thanks. <sect1> Future Plans: You Can Help <p> Please let me know of any errors in facts, opinions, logic, @@ -177,45 +182,42 @@ spelling, grammar, clarity, links, etc. But first, if the date is over a few months old, check to see that you have the latest version. Please send me any info that you think belongs in this document. -Starting with version 1.00, a first attempt was made to help people -set up terminals without recourse to a terminal manual. Much more is -needed in this respect. One way to solve this problem would be for -more terminal manufacturers put their manuals on the Internet. Wyse -has already done so. I suggest that you encourage others to do so (if -they haven't already). The task of providing information on how to -configure most terminals in this HOWTO is daunting. There are so many -different terminals, but there are far fewer models than there used to -be in the 1980,s so the task is not totally infeasible. +In order to fully utilize all the features of a certain real terminal, +one needs the terminal manuals that came with the terminal when it was +new. If you don't have a manual, this HOWTO may be of some help. One +way to solve this problem would be for more terminal manufacturers put +their manuals on the Internet. Please send me any surplus terminal manuals which you may have, -especially on terminals made within the past 10 years (but I'll +especially on terminals made within the past 15 years (but I'll accept older ones also). Also, you might want to write up something on a certain terminal to put in the Appendix D: Notes by Brand Name. <sect1> New Versions of this HOWTO <p> New versions of the Text-Terminal-HOWTO should be released every -year or so. They will be available to browse and/or download at -LDP mirror sites. For a list of mirror sites see: <url -url="http://tldp.org/mirrors.html">. Various formats are -available. If you only want to quickly check the date of the latest -version look at <url -url="http://tldp.org/HOWTO/Text-Terminal-HOWTO.html">. The -version your are currently reading is: v1.39, August 2006 . +year or so. To get the latest version go to an LDP mirror sites (see: +<url url="http://www.tldp.org/mirrors.html">). To quickly check the date +of the latest version look at <url +url="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Text-Terminal-HOWTO.html" +name="Text-Terminal-HOWTO.html">. The version your are currently +reading is: v1.40 December 2006 . -<sect1>New in Recent Versions: -<p> For a full revision history going back to the first version in +For a full revision history going back to the first version in 1998 see the source file (in linuxdoc format) at <url url="http://cvsview.tldp.org/index.cgi/LDP/howto/linuxdoc/Text-Terminal-HOWTO.sgml"> and click on text. <itemize> +<item>v1.40 Dec. 2006 Picocom is like minicom. Devfs obsolete so removed + tts/1, etc. Updated pseudo terminals. More about telnet, ssh, and + non-serial port interfaces. IBM terminal emulation over telnet. + Kermit for MS does terminal emulation. Ports of minicom to Mac. + Fixed/removed broken links. "reset" is an alias for "tset" <item>v1.39 Aug. 2006 Typo your -> you're; Termcap Manual = Termcap Library; Fixed several broken links. Found link to mapchan program. <item>v1.38 Feb. 2006 Fixed typos "the the" <item>v1.37 Feb. 2006 "file-transfer" cables, typo: VT012=>VT102, url to Text-Terminal source fixed, not revised every few months anymore, edited key cleaning -<item>v1.36 Aug. 2004 Typo for "quit", etc. Should be ^\ -<item>v1.35 Mar. 2004: Wyse 60 emulator </itemize> <sect1> Related HOWTOs, etc. <label id="related_howtos"> @@ -251,45 +253,60 @@ suspect is true (but may not be) ends with 2 question marks: ?? If you know for sure, let me know. <sect1> What is a Terminal ? -<p> A real terminal consists of a screen and keyboard that one uses to -communicate remotely with a (host) computer. One uses it just like it -was a personal computer but the terminal is remote from its host +<p> A terminal consists of a screen and keyboard that one uses to +communicate remotely with a (host) computer. One uses it almost like +it was a personal computer but the terminal is remote from its host computer (on the other side of the room or even on the other side of the world). Programs execute on the host computer but the results display on the terminal screen. The terminal's computational ability -is relatively low (otherwise it would be a computer and not a -terminal). The terminal is generally limited to the ability to -display what is sent to it (possibly including full-screen graphics) -and the ability to send to the host what is typed at the keyboard. +is relatively low compared to the host computer but often the terminal +is just a personal computer (PC) itself which has been programmed to +behave like a terminal. It often doesn't allow the user full +access to either the PC it runs on nor the host it is connected to. +You'll find this type of terminal at libraries and schools. But some +terminals permit the user to log into the host computer and provide +access dependent on the user's status. -A text-terminal only displays text on the screen without pictures. In -the days of mainframes from the mid 1970's to the mid 1980's, most -people used real text-terminals to communicate with computers. They -typed in programs, ran programs, wrote documents, issued printing -commands, etc. A cable connected the terminal to the computer (often -indirectly). It was called a terminal since it was located at the -terminal end of this cable. Some text-terminals were called "graphic" -but the resolution was poor and the speed slow by today's standards -due to the high cost of memory and the limited speed of the -conventional serial port, etc. +<sect1> What is a Text-Terminal ? +<p>A text-terminal is a terminal which only displays text on the +screen without pictures. Today, it's mostly done by PCs which emulate +the terminals of olden days. -Today, real terminals are not as common as they once were and most -people that use terminals use a personal computer to emulate a -terminal. Almost everyone who uses Linux uses terminal emulation. -Without X Window, one uses a text interface (virtual terminal). It's -also called a command line interface. In X Window one can get one or -more terminal windows (xterm, rxvt, or zterm). All these use software -to emulate a real terminal. +<sect2>Real text terminals +<p> In the olden days of mainframes, from the mid 1970's to the mid +1980's, most people used real text-terminals to communicate with large +computers. These real text-terminals were neither computers nor +emulated text-terminals. They consisted only of a screen, keyboard, +and only enough memory to store a screenfull or so of text (a few +kilobytes). Users typed in programs, ran programs, wrote documents, +issued printing commands, etc. A cable connected the terminal to the +computer (often indirectly). It was called a terminal since it was +located at the terminal end of this cable. Some text-terminals were +called "graphic" but the resolution was poor and the speed slow by +today's standards due to the high cost of memory and the limited speed +of the conventional serial port, etc. -A real text-terminal is different from a monitor because it's a different -electronic setup. A text terminal is often connected to a serial port -of the computer via a long cable. Thus, in contrast to a monitor -which is usually located right next to the computer, a terminal may be -quite a distance away from its host computer. For a monitor, the -video card inside a computer stores the video image. For a terminal, -the equivalent of this video card is built right into the terminal but -since text terminals are often monochrome without much graphics, the -capabilities of its "video card" are rather weak. Also, most text +Today, real terminals are becoming rarities and most people that use +terminals use a personal computer to emulate a terminal. Almost +everyone who uses Linux uses terminal emulation. When you are not +using an X Window GUI at a Linux PC, you are likely using a text +interface (virtual terminal). It's also called a command line +interface. In X Window one can also get one or more terminal windows +(xterm, rxvt, or zterm). All these use software to emulate a real +terminal. + +A real text-terminal is different from a monitor because the simple +character images that get displayed on the text-terminal are stored +right inside the terminal in it's memory. For a monitor, the complex +images are stored in the video card of the PC and/or in the PC's +memory itself. The text-terminal's keyboard plugs into the the +terminal and is part of the terminal while a PC's keyboard plugs into +the computer. + +For a monitor, the video images are sent by a short cable running from +the video card to the monitor while for a text-terminal there is a +bi-directional flow of character bytes in a long cable between the +computer's serial port and the PC it's connected to. Most text terminals do not have mice. In network client-server terminology, one might think that the @@ -297,14 +314,15 @@ terminal is the client and that the host computer is the server. The terminal has been called a "thin client" by some. But it is not actually a "client" nor is the host a "server". The only "service" the host provides is to receive every letter typed at the keyboard and -react to this just like a computer would. The terminal is like a -window into the computer just like a monitor (and keyboard) are. You -may have already used virtual terminals in Linux (by pressing Left -Alt-F2, etc.). A real terminal is just like running such a virtual -terminal but you run it on its own terminal screen instead of having -to share the monitor screen. In contrast to using a virtual terminal -at the console (monitor), this allows another person to sit at a -terminal and use the computer simultaneously with others. +react to this just like a computer would if you typed at its keyboard. +The terminal is like a window into the computer just like a monitor +(and keyboard) are. You may have already used virtual terminals in +Linux (by pressing Left Alt-F2, etc.). A real terminal is just like +running such a virtual terminal but you run it on its own terminal +screen instead of having to share the monitor screen. In contrast to +using a virtual terminal at the console (monitor), this allows another +person to sit at a terminal and use the same computer simultaneously +with others. <sect> Types of Terminals @@ -328,11 +346,11 @@ computer and the terminal takes place over the cable that connects them together. This flow is in bytes (such as ASCII) where each byte usually represents a printable character. Bytes typed at the keyboard go to the computer and most bytes from the computer are displayed on -the terminal screen. Special control bytes (or sequences of bytes) from the -computer tell the terminal where to move the cursor to, what to erase, -where to begin and end underlining and/or blinking and/or bold, etc. -There are often hundreds of such special commands and most terminals -can even change fonts. +the terminal screen. Special control bytes (or sequences of bytes) +from the computer tell the terminal where to move the cursor to, what +to erase, where to begin and end underlining and/or blinking and/or +bold, etc. There are often hundreds of such special commands and most +terminals can even change fonts. The communication uses characters (letters) encoded using a code chart for the character set being used. Usually, the first 128 bytes out of @@ -363,12 +381,13 @@ characters) is sent to the computer all at once. Block mode (as of late 1998) is not supported by Linux. See section <ref id="block" name="Block Mode">. -<sect1> Graphic GUI Capabilities of Text Terminals -<p> Many text terminals can display bit-mapped images, but not in -color. Unfortunately, the popular image formats used on the Internet -are not supported. The protocols for terminal graphics include: -Tektronix Vector Graphics, ReGIS (DEC), Sixel (DEC), and NAPLPS (North -American Presentation Level Protocol Syntax). +<sect1> Graphic GUI Capabilities of Text Terminals +<p> Many text +terminals can display bit-mapped images, but not in color. +Unfortunately, the popular image formats used on the Internet are not +supported. The protocols for terminal graphics include: Tektronix +Vector Graphics, ReGIS (DEC), Sixel (DEC), and NAPLPS (North American +Presentation Level Protocol Syntax). Even without bit-mapped images, ordinary text terminals can sort of display images. One may form arrows <--- and draw boxes with |__|, @@ -379,10 +398,11 @@ term "graphics terminal" usually means a terminal that can display bit mapped images. However, this term is sometimes applied also to text-only terminals since text is a limited form of graphics. -<sect2> Graphics GUI displays <label id="vector_graphics"> -<p> There are two basic types of graphics displays: raster and vector -(rarely used). Raster graphics (bit-mapped) puts dots on the screen -by horizontal scan lines drawn by an electron beam (or by activating +<sect2> Graphics GUI displays <label id="vector_graphics"> +<p> There +are two basic types of graphics displays: raster and vector (rarely +used). Raster graphics (bit-mapped) puts dots on the screen by +horizontal scan lines drawn by an electron beam (or by activating pixels or dots on a flat screen). Vector graphic displays were intended to be used for monochrome screens that don't have any dots. They use smart electronics to draw lines and curves with an electron @@ -396,9 +416,9 @@ lines due to the electronic limitations but they can be translated to raster graphics format for display (with a resulting drop in image quality). -<sect1> Thin Clients (Terminals ?) +<sect> Thin Clients Terminals -<sect2> Introduction +<sect1> Introduction <p> Since "thin clients" are not text terminals, this HOWTO only provides a brief overview of them. There are other HOWTOs that cover them in more detail. See <ref id="related_howtos" name="Related @@ -440,29 +460,30 @@ emulate a text terminal and have a serial port connector for that purpose. One even has a USB interface. There are various types of thin clients. One type is the "Window -Terminal" which runs under MS servers (and software). Another -type is the "network computer" which is supposed to be platform -neutral. This implies they should work with both MS Windows and Linux -but early models may not be easy to use with Linux. For Linux, the X -Window protocol is used. See <ref id="linux_thin_clients" name="Thin -clients and NCs under Linux"> +Terminal" which runs under MS servers (and software). Another type is +the "network computer" which is supposed to be platform neutral. This +implies they should work with both MS Windows and Linux but early +models may not be easy to use with Linux. For Linux, the X Window +protocol is used. See <ref id="linux_thin_clients" name="Thin clients +and NCs under Linux"> -<sect2> MS Window terminals -<p>These are true terminals since all the computing work is done by -a server running Windows. They are also called "Window-based -Terminals" (WBT). These terminals (clients) are something like -computers since they often run an embedded operating system such as -Linux or Microsoft's CE, NT, or XP. It's often stored in flash memory -so that it may be updated. Also, ordinary PCs can be used as clients -(including, in some cases, Linux PCs) with the appropriate software, -Some clients can support X Window (from a Linux server) and some can -emulate text-terminals. Many so called "network computers" can also -run X Window. This will be discussed in the next section. +<sect1> MS Window terminals +<p>These are true terminals since all the +computing work is done by a server running Windows. They are also +called "Window-based Terminals" (WBT). These terminals (clients) are +something like computers since they often run an embedded operating +system such as Linux or Microsoft's CE, NT, or XP. It's often stored +in flash memory so that it may be updated. Also, ordinary PCs can be +used as clients (including, in some cases, Linux PCs) with the +appropriate software, Some clients can support X Window (from a Linux +server) and some can emulate text-terminals. Many so called "network +computers" can also run X Window. This will be discussed in the next +section. The server for these clients usually runs MS's Terminal Services (for Windows 2000 servers). Prior to this there was Windows NT Terminal Server Edition (starting mid 1998 with codename "Hydra"). MS uses RDP -(Remote Desktop Protocol) which is based on the ITU T.120 protocol. +(Remote Desktop Protocol) which is based on the ITU T.120 protocol. In addition, there is an optional ICA protocol (with added features) which can inter-operate with RDP. @@ -479,30 +500,30 @@ system. PCs running Linux can be turned into ICA based client terminals using "free" (in price only) proprietary ICA client software from Citrix: -<url url="http://www.citrix.com/download/unix-downloads.asp" -name="Citrix Systems, Inc.">. Unfortunately, MS requires that you -purchase a license to cover the clients, even if the clients all run -Linux. So if you want to save money on software costs by using Linux, -you'll have to go all-Linux and use both Linux servers and clients -using the free X-Window protocol. +<url url= "http://support.citrix.com/article/CTX879408" name="Installing +the Linux Client">. Unfortunately, MS requires that you purchase a +license to cover the clients, even if the clients all run Linux. So +if you want to save money on software costs by using Linux, you'll +have to go all-Linux and use both Linux servers and clients using the +free X-Window protocol. The above is sometimes called "network computing" since the terminals and servers connect to each other over a network (such as the common TCP/IP based network used by both Linux and MS). Network computers may be somewhat different as described below. -<sect2> Network computers (NCs) -<p>These are neither true computers nor true terminals but are -something in-between. One type of network computer (NC's) is a -computer with a CPU but no hard Disk. The OS it needs to run is sent -to it over a network. NCs are full-graphics and use the services of a -server computer. They are a little different from terminals since -some (or most) of the programs they run may execute on their own CPU -chip. Running a browser was supposed to be one of their primary -functions and thus Java code applets may be sent to them for -execution. Many NCs support X Window so that one may use a Linux -server to support it. Such a server may be called a "Linux Terminal -Server". IBM called their NC a "NetStation" but now calls it +<sect2> Network computers (NCs) +<p>These are neither true computers +nor true terminals but are something in-between. One type of network +computer (NC's) is a computer with a CPU but no hard Disk. The OS it +needs to run is sent to it over a network. NCs are full-graphics and +use the services of a server computer. They are a little different +from terminals since some (or most) of the programs they run may +execute on their own CPU chip. Running a browser was supposed to be +one of their primary functions and thus Java code applets may be sent +to them for execution. Many NCs support X Window so that one may use +a Linux server to support it. Such a server may be called a "Linux +Terminal Server". IBM called their NC a "NetStation" but now calls it "NetVista". They should work on Intranet type networks and NetVista can run the Linux OS. @@ -510,15 +531,16 @@ Wintel came out with a "NetPC" which, unlike the above, is almost a PC computer. However, it has no removable disks so users can't install their own software or obtain copies of anything. -<sect2> Thin clients and NCs under Linux <label id="linux_thin_clients"> -<p> There is a "Linux Terminal Server Project" (LTSP or ltsp) to use -Linux as a server for diskless thin clients. They use X Window and by -default, applications run on the server. But with additional effort, -one can set it up so that some or all applications run on the -"terminal". See <url url="http://www.ltsp.org/">. +<sect2> Thin clients and NCs under Linux <label +id="linux_thin_clients"> <p> There is a "Linux Terminal Server +Project" (LTSP or ltsp) to use Linux as a server for diskless thin +clients. They use X Window and by default, applications run on the +server. But with additional effort, one can set it up so that some or +all applications run on the "terminal". See <url +url="http://www.ltsp.org/">. -"Terminal" in LTSP is actually a thin (or fat) client. This -project's client can also run a telnet session and thus behave like a +"Terminal" in LTSP is actually a thin (or fat) client. This project's +client can also run a telnet session and thus behave like a text-terminal. A software package named "lts" for the LTSP is available in the major Linux distributions. @@ -533,9 +555,8 @@ are connected to each other via a network, then a person on one computer can run programs on another computer. Such a program sends messages over the network so that it appears just like a program was being run by your local computer. But such a program is actually -being run on another computer on the network. It works also with -X Window so that one may see GUI images generated on another -computer. +being run on another computer on the network. It works also with X +Window so that one may see GUI images generated on another computer. Linux also allows a computer to be diskless and boot over a network. See the "Terminal Server Project" above which has special software for @@ -568,25 +589,21 @@ X Window terminal. There are some Linux HOWTOs for certain brands of NCs: -<itemize> -<item> JavaStation-HOWTO (by Sun) -<item> NC-HOWTO (IBM NetStation) -<item> NCD mini-HOWTO (NCD-ThinSTAR) -<item> NCD-X-Terminal mini-HOWTO -<item> XDM-and-X-Terminal mini-HOWTO -</itemize> +<itemize> <item> JavaStation-HOWTO (by Sun) <item> NC-HOWTO (IBM +NetStation) <item> NCD mini-HOWTO (NCD-ThinSTAR) <item> NCD-X-Terminal +mini-HOWTO <item> XDM-and-X-Terminal mini-HOWTO </itemize> -<sect2> Hardware hookups -<p> There are 3 different types of hardware arrangements for thin -clients. The first type just uses a PC computer as a thin client by -emulating a thin client. It really isn't a thin client but it behaves -like one. The second type looks just like a text-terminal. It just -looks like a monitor, with a connector for a keyboard and another -connector for a network cable. It's a dedicated thin client and can't -be used for anything else. The third type looks like a tiny computer. -It uses a standard PC monitor and keyboard both of which plug into a -small box which is a "thin" computer. This box provides an interface -between the monitor/keyboard and the network. +<sect2> Hardware hookups +<p> There are 3 different types of hardware +arrangements for thin clients. The first type just uses a PC computer +as a thin client by emulating a thin client. It really isn't a thin +client but it behaves like one. The second type looks just like a +text-terminal. It just looks like a monitor, with a connector for a +keyboard and another connector for a network cable. It's a dedicated +thin client and can't be used for anything else. The third type looks +like a tiny computer. It uses a standard PC monitor and keyboard both +of which plug into a small box which is a "thin" computer. This box +provides an interface between the monitor/keyboard and the network. <sect2> History and the future <p> Promoters of NCs and related Window-Terminals projected that they @@ -629,16 +646,16 @@ To install a terminal, first look in <tt>/etc/termcap</tt> or <tt>terminfo.src</tt> to find an entry for it (see <ref id="termcap2" name="Terminfo and Termcap (detailed)">). Figure out what serial port you'll connect it to and what the tty designation is for that port -(e.g. ttyS1 or tts/1), see <ref id="dev_names" name="Device Names">). -As the root user, edit <tt>/etc/inittab</tt> and add a getty command -next to the other getty commands. The format of the getty command -depends on which getty program you use. <tt/agetty/ (called just -<tt/getty/ in the Debian distribution) is the easiest (no -configuration file). See the "<tt/info/" or "<tt/man/ re <tt/getty/. -For getty parameters use the terminfo (or termcap) name (such as -vt100) for your terminal. Type in a baud-rate that the terminal -supports. But if you set the baud too high you may need to use -(See<ref id="flow_control" name="Flow Control">). +e.g. ttyS1, see <ref id="dev_names" name="Device Names">). As the +root user, edit <tt>/etc/inittab</tt> and add a getty command next to +the other getty commands. The format of the getty command depends on +which getty program you use. <tt/agetty/ (called just <tt/getty/ in +the Debian distribution) is the easiest (no configuration file). See +the "<tt/info/" or "<tt/man/ re <tt/getty/. For getty parameters use +the terminfo (or termcap) name (such as vt100) for your terminal. +Type in a baud-rate that the terminal supports. But if you set the +baud too high you may need to use (See<ref id="flow_control" +name="Flow Control">). Then physically connect the main serial port of the terminal to the chosen serial port of the computer with a file-transfer (null modem) @@ -653,21 +670,21 @@ see <ref id="trouble_shoot" name="Trouble-Shooting">. <sect>Why Use a Terminal ? -<sect1> Intro to Why Use a Terminal -<p> PC's are so powerful today that just one PC can often support -several persons using it at once, especially if they are doing -low-load tasks such as text editing, data entry, etc. One way to do -this is to connect a number of terminals to a single PC (or other host -computer) by modems or direct cable connection. To do this, it's -usually best to have a multi-user operating system such as Linux so -that each user at a terminal can use the computer independently. This -has been called "time sharing" but it's not good terminology today -since "distributed" computing over a network is also a type of time -sharing. It might be better described as "centralized" computing. -But the central computer may be connected to the rest of the world via -a network so that terminal users may send email, browse the Internet -with the lynx browser, etc. So it's not exactly "centralized" -either. +<sect1> Intro to Why Use a Terminal +<p> PC's are so powerful today +that just one PC can often support several persons using it at once, +especially if they are doing low-load tasks such as text editing, data +entry, etc. One way to do this is to connect a number of terminals to +a single PC (or other host computer) by modems or direct cable +connection. To do this, it's usually best to have a multi-user +operating system such as Linux so that each user at a terminal can use +the computer independently. This has been called "time sharing" but +it's not good terminology today since "distributed" computing over a +network is also a type of time sharing. It might be better described +as "centralized" computing. But the central computer may be connected +to the rest of the world via a network so that terminal users may send +email, browse the Internet with the lynx browser, etc. So it's not +exactly "centralized" either. Terminals have seldom been used with PC's because the popular operating systems used for them (Windows, DOS, and Mac) were not @@ -678,12 +695,12 @@ with PC's becomes more feasible. The drawback is that text terminals are not smart enough to support the type of graphical user interface (GUI) that many computer users today normally expect. -<sect1> Lower Hardware Costs ? -<p> When Computers (including PCs) were quite expensive, lower hardware -costs was a significant advantage of using terminals. Today with -cheap PCs, the cost savings is problematical. Here's what I wrote -years ago when PCs were more expensive. It's still true today but of -less significance. +<sect1> Lower Hardware Costs ? +<p> When Computers (including PCs) +were quite expensive, lower hardware costs was a significant advantage +of using terminals. Today with cheap PCs, the cost savings is +problematical. Here's what I wrote years ago when PCs were more +expensive. It's still true today but of less significance. If several people use the same computer as the same time, there is a reduction in the amount of hardware needed for the same level of @@ -711,104 +728,104 @@ computer. For a fair comparison with PC's, the terminals should have the same capabilities as the PC monitors. Unfortunately, color graphic terminals for Linux (X Window) with high speed communication cost -about as much as a PC so in this case there not much (if any) -savings in hardware costs. But for text terminals there will be some -savings, especially if the terminals are obtained used at low cost. +about as much as a PC so in this case there not much (if any) savings +in hardware costs. But for text terminals there will be some savings, +especially if the terminals are obtained used at low cost. -<sect1> Control of Software -<p> For centralized computing, software (and the updates to software) -only need be installed and configured on one host computer instead of -several. The person in charge of this computer may control and -configure the software which is installed on it. This is advantageous -if the person controlling the host computer does an excellent job and -knows about the needs and preferences of the other users. Users can -be restricted in playing games or surfing the Internet by not -installing the software (or by otherwise restricting access to it). -Whether or not centralized control is desirable depends on the -situation. +<sect1> Control of Software +<p> For centralized computing, software +(and the updates to software) only need be installed and configured on +one host computer instead of several. The person in charge of this +computer may control and configure the software which is installed on +it. This is advantageous if the person controlling the host computer +does an excellent job and knows about the needs and preferences of the +other users. Users can be restricted in playing games or surfing the +Internet by not installing the software (or by otherwise restricting +access to it). Whether or not centralized control is desirable +depends on the situation. -<sect1> Hardware Upgrades -<p> With terminals, the computer hardware upgrades take place on only -one computer instead of many. This saves installation labor effort. -While the cost of the hardware for the host computer upgrade will be -more than that for a single PC (since the host needs more computing -power than a PC), the cost will be significantly less than upgrading -the hardware of a number of PC's being used instead of terminals. +<sect1> Hardware Upgrades +<p> With terminals, the computer hardware +upgrades take place on only one computer instead of many. This saves +installation labor effort. While the cost of the hardware for the +host computer upgrade will be more than that for a single PC (since +the host needs more computing power than a PC), the cost will be +significantly less than upgrading the hardware of a number of PC's +being used instead of terminals. -<sect1> Other Advantages of Terminals -<p> <itemize> -<item> The elimination of noise from fans and disk drives (unless -you're using a PC to emulate a terminal). -<item> The users of the terminals can share data and files -and send e-mail to each other. It's similar to a local network. -</itemize> +<sect1> Other Advantages of Terminals +<p> <itemize> <item> The +elimination of noise from fans and disk drives (unless you're using a +PC to emulate a terminal). <item> The users of the terminals can +share data and files and send e-mail to each other. It's similar to a +local network. </itemize> -<sect1> Major Disadvantages of Terminals -<p> <itemize> -<item> Text terminals have no high-speed graphic display (or high - resolution graphics) although they can often use graphic character - sets to draw boxes, etc. This lack limits the software that may be - used on it. +<sect1> Major Disadvantages of Terminals +<p> <itemize> <item> Text +terminals have no high-speed graphic display (or high resolution +graphics) although they can often use graphic character sets to draw +boxes, etc. This lack limits the software that may be used on it. <item> If the host computer goes down, then no one can use the - terminals either (unless there is a "standby" host computer to connect to). -</itemize> +terminals either (unless there is a "standby" host computer to connect +to). </itemize> -<sect1> Are Text Terminals Obsolete ? -<p> Text terminals are technologically obsolete because for a slightly -higher cost of hardware, one could build a smarter terminal (with the -same quality of display). This wasn't always the case since around -1980 memory cost thousands of dollars per megabyte. Today with low -costs for memory and processors, one could turn a text terminal into a -GUI graphic terminal for only about a 10% or 20% increase in hardware -cost. Since a PC can emulate a terminal, almost everyone using -computers has a terminal emulator available. +<sect1> Are Text Terminals Obsolete ? +<p> Text terminals are +technologically obsolete because for a slightly higher cost of +hardware, one could build a smarter terminal (with the same quality of +display). This wasn't always the case since around 1980 memory cost +thousands of dollars per megabyte. Today with low costs for memory +and processors, one could turn a text terminal into a GUI graphic +terminal for only about a 10% or 20% increase in hardware cost. Since +a PC can emulate a terminal, almost everyone using computers has a +terminal emulator available. -The reasons that text terminals are not fully obsolete are: -<itemize> +The reasons that text terminals are not fully obsolete are: <itemize> <item> The resolution of characters on the screen is better on -monochrome terminals than for monitors in text mode. -<item> Many people don't need full screen graphics. -<item> Since running a text-terminal (in contrast to a GUI-graphics -terminal) doesn't consume much of a modern PC's resources, a large -number of terminals may be efficiently run from one PC. -</itemize> +monochrome terminals than for monitors in text mode. <item> Many +people don't need full screen graphics. <item> Since running a +text-terminal (in contrast to a GUI-graphics terminal) doesn't consume +much of a modern PC's resources, a large number of terminals may be +efficiently run from one PC. </itemize> <sect> Overview of How Terminals Work (in Linux) <label id="overview"> <p> See also section <ref id="HowTermsWorkDetail" name="Some Details on How Terminals Work"> -<sect1> Device Names <label id="dev_names"> -<p> Each terminal is connected to a serial port on the host computer -(often just a PC). The ports have names/numbers. The first few are: tts/0 -(or ttyS0), tts/1 (or ttyS1), tts/2 (or ttyS2) etc. +<sect1> Device Names <label id="dev_names"> +<p> Each terminal is +connected to a serial port on the host computer (often just a PC). +The ports have names/numbers. The first few are: ttyS0, ttyS1, ttyS2, +etc. These are represented by special files found in the /dev (device) -directory. tts/0 (or ttyS0) corresponds to COM1 in DOS or Windows. -tts/1 (or ttyS1) is COM2, etc. See <ref id="devices_" name="Terminal -Special Files"> for details on these and related "devices". +directory. ttyS0) corresponds to COM1 in DOS or Windows. ttyS1) is +COM2, etc. See <ref id="devices_" name="Terminal Special Files"> for +details on these and related "devices". -<sect1> Login/Logout -<p> When the host computer starts up it runs the program getty. The -getty program runs the "login" program to log people in. See <ref -id="getty_" name="Getty (used in /etc/inittab)">. A "login:" prompt -appears on the screen. People at the terminals log in (after giving -their passwords) and then have access to the computer. When it's time -to shut the terminal down, one normally logs out and turns the -terminal off. See <ref id="login_restr" name="Login Restrictions"> -regarding restricting logins (including allowing the root user to log -in at terminal). +<sect1> Login/Logout +<p> When the host computer starts up it runs the +program getty. The getty program runs the "login" program to log +people in. See <ref id="getty_" name="Getty (used in /etc/inittab)">. +A "login:" prompt appears on the screen. People at the terminals log +in (after giving their passwords) and then have access to the +computer. When it's time to shut the terminal down, one normally logs +out and turns the terminal off. See <ref id="login_restr" name="Login +Restrictions"> regarding restricting logins (including allowing the +root user to log in at terminal). -<sect1> Half/Full Duplex <label id="half_duplex"> -<p> If one watches someone typing at a terminal, the letters one types -simultaneously appear on the screen. A naive person might think that -what one types is being sent directly from the keyboard to the screen -with a copy going to the computer (half-duplex like, see next -paragraph). What is usually going on is that what is typed at the -keyboard is directly sent only to the host computer which in turn -echoes back to the terminal each character it receives (called -full-duplex). In some cases (such as passwords or terse editor -commands) the typed letters are not echoed back. +<sect1> Half/Full Duplex <label id="half_duplex"> +<p> If one watches +someone typing at a terminal, the letters one types simultaneously +appear on the screen. A naive person might think that what one types +is being sent directly from the keyboard to the screen with a copy +going to the computer (half-duplex like, see next paragraph). What is +usually going on is that what is typed at the keyboard is directly +sent only to the host computer which in turn echoes back to the +terminal each character it receives (called full-duplex). In some +cases (such as passwords or terse editor commands) the typed letters +are not echoed back. Full-duplex means that there are two (dual) one-way communication links. Full-duplex is the norm for terminals. Half-duplex is half of @@ -820,25 +837,27 @@ send to it) so the terminal would need to also send each character you type directly to the terminal screen. Some terminals have a half-duplex mode of operation which is seldom used. -<sect1> Terminal Memory -<p> The image on a CRT tube will fade away almost instantly unless it -is frequently redrawn on the screen by a beam of electrons shot onto -the face of the tube. Since text sent to a terminal needs to stay -on the screen, the image on the screen must be stored in the memory -chips of the terminal and the electron beam must repeatedly scan the -screen (say 60 times per second) to maintain the image. See <ref -id="term_mem_detail" name="Terminal Memory Details"> for more details. +<sect1> Terminal Memory +<p> The image on a CRT tube will fade away +almost instantly unless it is frequently redrawn on the screen by a +beam of electrons shot onto the face of the tube. Since text sent to +a terminal needs to stay on the screen, the image on the screen must +be stored in the memory chips of the terminal and the electron beam +must repeatedly scan the screen (say 60 times per second) to maintain +the image. See <ref id="term_mem_detail" name="Terminal Memory +Details"> for more details. -<sect1> Commands for the Terminal -<p> The terminal is under the control of the computer. The computer -not only sends the terminal text to display on the screen but also -sends the terminal commands which are acted on. These are <ref -id="control_codes" name="Control Codes"> (bytes) and <ref id="esc_seq" -name="escape sequences">. For example, the CR (carriage return) -control code moves the cursor to the left hand edge of the screen. A -certain escape sequence (several bytes where the first byte is the -"escape" control code) can move the cursor to the location on the -screen specified by parameters placed inside the escape sequence. +<sect1> Commands for the Terminal +<p> The terminal is under the +control of the computer. The computer not only sends the terminal +text to display on the screen but also sends the terminal commands +which are acted on. These are <ref id="control_codes" name="Control +Codes"> (bytes) and <ref id="esc_seq" name="escape sequences">. For +example, the CR (carriage return) control code moves the cursor to the +left hand edge of the screen. A certain escape sequence (several +bytes where the first byte is the "escape" control code) can move the +cursor to the location on the screen specified by parameters placed +inside the escape sequence. The <ref id="early_terms" name="first terminals"> had only a few such commands but modern terminals have hundreds of them. The appearance @@ -851,19 +870,20 @@ of the screen may be erased. Various types of flow control may be used to stop the flow of data when bytes are being sent to the terminal faster than the terminal can handle them. There are many more as you will see from looking over an advanced terminal manual or -from the Internet links <ref id="esc_seq_lists" name="Esc Sequence List"> +from the Internet links <ref id="esc_seq_lists" name="Esc Sequence +List"> -<sect1> Lack of Standardization Solved by Terminfo -<p> While terminals made for the US all used the same ASCII code for -the alphabet (except for IBM terminals which used EBCDIC), they -unfortunately did not all use the same escape sequences. This -happened even after various ANSI (and ISO) standards were established -since these standards were never quite advanced enough. Furthermore, -older terminals often lacked the capabilities of newer terminals. -This might cause problems. For example, the computer might send a -terminal an escape sequence telling it to split the screen up into -two windows of specified size, not realizing that the terminal was -incapable of doing this. +<sect1> Lack of Standardization Solved by Terminfo +<p> While terminals +made for the US all used the same ASCII code for the alphabet (except +for IBM terminals which used EBCDIC), they unfortunately did not all +use the same escape sequences. This happened even after various ANSI +(and ISO) standards were established since these standards were never +quite advanced enough. Furthermore, older terminals often lacked the +capabilities of newer terminals. This might cause problems. For +example, the computer might send a terminal an escape sequence telling +it to split the screen up into two windows of specified size, not +realizing that the terminal was incapable of doing this. To overcome these problems a database called "termcap" (meaning "terminal capabilities") was established. Termcap was later @@ -880,25 +900,25 @@ certain C-Library functions. One large set of such programs (over "ncurses" which comes with a developer's ncurses package. There is also a NCURSES-programming-HOWTO. -<sect1> The Interface -<p> The environment variable TERM is the type of terminal Linux thinks -you are using. Most application programs use this to look up the -capabilities in the terminfo database so TERM needs to be set -correctly. But there is more to a correct interface than the -computer knowing about the capabilities of the terminal. +<sect1> The Interface +<p> The environment variable TERM is the type of +terminal Linux thinks you are using. Most application programs use +this to look up the capabilities in the terminfo database so TERM +needs to be set correctly. But there is more to a correct interface +than the computer knowing about the capabilities of the terminal. For bytes to flow from the computer to the terminal the terminal must be set to receive the bytes at the same baud rate (bits per second) as -they are sent out from the terminal. If the terminal is set to receive at -19,200 baud and the computer sends out characters at 9600 baud, only -garbage (or perhaps nothing) will be seen on the screen. One selects -the baud rate for a terminal (as well as many other features) from the -terminals "set-up" menus at the terminal. Most terminals have a large -number of options in their "set-up" menus (see <ref -id="term_conf_details" name="Terminal Set-Up (Configure) Details">). -The computer serial port has options also and these options must be -set up in a compatible way (see <ref id="comp_conf_details" name="Computer -Set-Up (Configure) Details">. +they are sent out from the terminal. If the terminal is set to +receive at 19,200 baud and the computer sends out characters at 9600 +baud, only garbage (or perhaps nothing) will be seen on the screen. +One selects the baud rate for a terminal (as well as many other +features) from the terminals "set-up" menus at the terminal. Most +terminals have a large number of options in their "set-up" menus (see +<ref id="term_conf_details" name="Terminal Set-Up (Configure) +Details">). The computer serial port has options also and these +options must be set up in a compatible way (see <ref +id="comp_conf_details" name="Computer Set-Up (Configure) Details">. <sect1> Emulation @@ -954,16 +974,13 @@ should be included with kernel sources. It "describes" what each device used for in only a word or two but doesn't tell you how to use them. -<sect1> Serial Port Terminals -<p> The computer considers each serial port to be a "device". It's -sometimes called a terminal device since at one time terminals were -the most common use for a serial port. For each such serial port -there is a special file in the /dev (device) directory. /dev/tts/0 -(or /dev/ttyS0) is the special file for the serial port known as COM1 -in the DOS/Windows world. The device filesystem notation: tts/0 is -replacing the older ttyS0 notation. But the older notation will be -often used in this howto since it is still widely used and often -still works (using symbolic links) on the newer device filesystems. +<sect1> Serial Port Terminals +<p> The computer considers each serial +port to be a "device". It's sometimes called a terminal device since +at one time terminals were the most common use for a serial port. For +each such serial port there is a special file in the /dev (device) +directory. /dev/ttyS0) is the special file for the serial port known +as COM1 in the DOS/Windows world. To send text to a terminal you may redirect standard output of some command-line command to the appropriate special file. For example @@ -975,58 +992,52 @@ permission on /dev/ttyS1. Similarly, typing "cat my_file > <sect1>Pseudo Terminals -<p> Pseudo terminals are pairs of devices such as /dev/pty/m3 -and /dev/pty/s3 (or respectively /dev/ptyp3 and /dev/ttyp3 if you're -not using the device filesystem). There is no physical device -directly associated with either of them, not even a serial port -connector. But if a program treats s3 (ttyp3) like it was a serial -port, what is read and written to that port appears on the other -member of the pair m3 (ptyp3) which another program uses to read and -write to. Thus two programs talk to each other via this method and -one program (on s3=ttyp3) thinks it's talking to a serial port. It's -something like a "pipe" between m3 and s3. +<p> Pseudo terminals are pairs of devices such as /dev/ptyp3 and +/dev/ttyp3. There is no physical device directly associated with +either of them, not even a serial port connector. But if a program +treats ttyp3 like it was a serial port, what is read and written to +that port appears on the other member of the pair ptyp3 which another +program uses to read and write to. Thus two programs talk to each +other via this method and one program on ttyp3 thinks it's talking to +a serial port. It's something like a "pipe" between these two tty's. -For talking to s3 (ttyp3), any program designed to talk to a serial -port will do. But for the other program that talks to m3 (ptyp3), it -must have been specially written to talk to m3. It's mainly -programmers that must concern themselves with pseudo terminals and -most users don't need to worry about them. +For talking to ttyp3, any program designed to talk to a serial port +will do. But for the other program that talks to ptyp3, it must have +been specially written to talk to it. It's mainly programmers that +must concern themselves with pseudo terminals and most users don't +need to worry about them. Here's an example: If someone connects via telnet to your computer over a network (you are a telnet server), the part of the telnet program handling this connection on your computer may wind up -connected to the pseudo terminal m2 (ptyp2). A getty program should -be running on the corresponding s2 (ttyp2). Getty thinks it's talking -to a terminal. When telnet gets a character from the remote client, -it goes thru m2 to s2 to getty which then sends back "login:" routed -to s2, m2, your server telnet program, and then out to the network back to -the client. Here the login program and the telnet server program talk -to each other via a "pseudo terminal". Note that there is no pseudo -terminal used on the client computer, just telnet. Of course the -server allocates a pseudo terminal (on the server) for each client. +connected to the pseudo terminal ptyp2. A getty program should be +running on the corresponding ttyp2. Getty thinks it's talking to a +terminal. When telnet gets a character from the remote client, it +goes thru ptyp2 to ttyp2 to getty which then sends back "login:" +routed via ttyp2, ptyp2, your server telnet program, and then out to +the network back to the client. Here the login program and the telnet +server program talk to each other via a "pseudo terminal". Note that +there is no pseudo terminal used on the client computer, just telnet. +Of course the server allocates a pseudo terminal (on the server) for +each client. In X Window, the terminal emulator program, xterm (or rxvt), uses pseudo terminals. Ham radio programs under Linux also use them. By using certain application software, it is possible to have 2 or more pseudo terminals attached to the same physical serial port. -For a pseudo terminal pair such as m3 (ptyp3) and s3 (ttyp3), the m... -(pty...) is the master or controlling terminal and the s... (tty...) -is the slave. The device filesystem notation makes this clear (m is -for master, s is for slave). The slave is like a serial port so also -think of s as standing for "serial". In the old notation, tty.. is -like a serial port ttyS (which in olden days was just tty). +For a pseudo terminal pair such as ptyp3 and ttyp3, the pty... is the +master or controlling terminal and the tty... is the slave. -Prior to the device filesystem a complex notation was used in order -to get a large number of pseudo terminals. There are only 16 ttyp's: -ttyp0-ttypf (f is a hexadecimal digit). To get more pairs, more -letters such as q, r, s were used instead of p. For example the pair -ttys8, ptys8 was a pseudo terminal pair. Later on, even more letters -were added so as to allow even more pseudo terminals. With the device -filesystem, we may just use, for example, /dev/pty/m57 instead of -/dev/ttys9 for the 58th pty master. People have made the mistake of -typing say ttys2 (which is a pseudo serial port) when they meant to -type ttyS2 (a real serial port). +There are only 16 ttyp's: ttyp0-ttypf (f is a hexadecimal digit). To +get more pairs, more letters such as q, r, s are used instead of p. +For example the pair ttys8, ptys8 is a pseudo terminal pair. Later +on, even more letters were added so as to allow even more pseudo +terminals. And when z was reached, they wrapped around to a. This is +confusing but old habits are difficult to change. Today Linux allow +say ttyp189 but it's not used. The device file system, which was +abandoned in 2004, would have used tty/s189. Be sure not to type say +ttys2 if you mean ttyS2 (a real serial port). The master and slave are really the same "port" but the slave is used by the application program and the master is used by a network program @@ -1034,44 +1045,59 @@ by the application program and the master is used by a network program The program using the slave port can run "as is" since it thinks it is talking to a serial port. -Unix98 (available on Linux) doesn't use the above but instead uses a -"pty master" which might be, for example, /dev/ptm3. It's slave is -automatically created as /dev/pts/3. It thus supplies a pty on demand. +Unix98 pseudo terminals (available on Linux) is more advanced than the +above but the basic concepts are the same (only the device names and +methods of creating them change). It creates pseudo terminal devices +on request so there is no need to check if the pseudo terminal you +might want to use in in use. By opening /dev/ptmx a new pseudo +terminal pair is created. The master doesn't show up as a device but +is just a file descriptor number passed to the computer program that +opened /dev/ptmx. But the slave is put into the /dev/pts directory: +for example" /dev/pts/3. + The /dev/pts directory is considered to be a file system of type devpts and appears in the lists of mounted filesystems. While the -"file" /dev/pts/3 looks like it would be an entry in the device -filesystem, it's really a wholly different kind of filesystem. +"file" /dev/pts/3 looks like an entry in the now obsolete device +filesystem, /dev/pts Is really a wholly different kind of filesystem. -While other unix-like systems have a manual page for pseudo terminals -(may be named "pty") Linux lacks one for the general user. But there -is a man-page for programmers: (openpty or forkpty) which assumes that -you already understand pseudo terminals. There is both a Linux pty -module and a /usr/include/pty.h file. +See the Linux manual pages "pty" and "pts" (Unix 98 style) for more +details. For programmers there's the man-page openpty/forkpty (either +name displays the same man-page) which assumes that you already +understand pseudo terminals. There is a usr/include/pty.h file for +use by programmers. In earlier versions of Linux there was a pty.o +module, but it now seems that it's been built into the kernel. Here's +an example of some options available when you are compiling a Linux +2.6 kernel: -<sect1> The Controlling Terminal /dev/tty -<p> /dev/tty stands for the controlling terminal (if any) for the -current process. To find out which tty's are attached to which -processes use the "ps -a" command at the shell prompt (command line). -Look at the "tty" column. For the shell process you're in, /dev/tty -is the terminal you are now using. Type "tty" at the shell prompt to -see what it is (see manual pg. tty(1)). /dev/tty is something like a -link to the actually terminal device name with some additional -features for C-programmers: see the manual page tty(4). +<tscreen><verb> CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 </verb></tscreen> -<sect1> /dev/ttyIN "Terminals" -<p> N stands for an integer. One use of these in Linux is with the -ISDN driver package: isdn4linux. The ttyIN is something like ttySN -but it emulates a modem and can be given modem commands. +<sect1> The Controlling Terminal /dev/tty +<p> /dev/tty stands for the +controlling terminal (if any) for the current process. To find out +which tty's are attached to which processes use the "ps -a" command at +the shell prompt (command line). Look at the "tty" column. For the +shell process you're in, /dev/tty is the terminal you are now using. +Type "tty" at the shell prompt to see what it is (see manual pg. +tty(1)). /dev/tty is something like a link to the actually terminal +device name with some additional features for C-programmers: see the +manual page tty(4). -<sect1> The Console: ttyN or vc/N<label id="console_dev"> <p> In Linux -the PC monitor is usually called the console and has several device -special files associated with it: vc/0 (tty0), vc/1 (tty1), vc/2 -(tty2), etc. When you log in you are on vc/1. To go to vc/2 (on the -same screen) press down the 2 keys Alt(left)-F3. For vc/3 use Left -Alt-F3, etc. These (vc/1, vc/2, vc/3, etc.) are called "virtual -terminals". vc/0 (tty0) is just an alias for the current virtual -terminal and it's where messages from the system are sent. Thus -messages from the system will be seen on the console (monitor) +<sect1> /dev/ttyIN "Terminals" +<p> N stands for an integer. One use +of these in Linux is with the ISDN driver package: isdn4linux. The +ttyIN is something like ttySN but it emulates a modem and can be given +modem commands. + +<sect1> The Console: ttyN or vc/N<label id="console_dev"> +<p> In Linux the PC monitor is usually called the console and has +several device special files associated with it: vc/0 (tty0), vc/1 +(tty1), vc/2 (tty2), etc. When you log in you are on vc/1. To go to +vc/2 (on the same screen) press down the 2 keys Alt(left)-F3. For +vc/3 use Left Alt-F3, etc. These (vc/1, vc/2, vc/3, etc.) are called +"virtual terminals". vc/0 (tty0) is just an alias for the current +virtual terminal and it's where messages from the system are sent. +Thus messages from the system will be seen on the console (monitor) regardless of which virtual terminal it is displaying. You may log in to different virtual terminals and thus have a few @@ -1080,52 +1106,56 @@ the system or the root user may write to /dev/vc/0 to which /dev/console is sometimes linked. For more info on the console see <ref id="console_" name="The Linux Console">. -<sect1> Creating a Device with "mknod" -<p> The /dev directory comes supplied with many device special files. -If you need something that's not there you may try to create it with -the "mknod" command. See the manual page ttys(4) for how to do this -for serial ports. To use <tt/mknod/ you must know the major and minor -device numbers. You might be able to infer the numbers you need by -using the "<tt/ls -l/" command in the /dev directory. It will display -the major and minor numbers of existing special files. +<sect1> Creating a Device with "mknod" +<p> The /dev directory comes +supplied with many device special files. If you need something that's +not there you may try to create it with the "mknod" command. See the +manual page ttys(4) for how to do this for serial ports. To use +<tt/mknod/ you must know the major and minor device numbers. You +might be able to infer the numbers you need by using the "<tt/ls -l/" +command in the /dev directory. It will display the major and minor +numbers of existing special files. -<sect> Some Details on How Terminals Work <label id="HowTermsWorkDetail"> +<sect> Some Details on How Terminals Work <label +id="HowTermsWorkDetail"> <p> If you know almost nothing about terminals, it's suggested that you first read <ref id="intro" name="Introduction"> and also read <ref id="overview" name="Overview of How Terminals Work">. -<sect1> Terminal Memory Details <label id="term_mem_detail"> -<p> The terminal screen refreshes itself at perhaps 60 times per -second from an image stored in the memory of the terminal. For a PC -the monitor's image is stored on the video card inside the computer -but for a terminal, the equivalent of the video card is inside the -terminal. For a text terminal the storage of the image uses little -memory. Instead of putting every dot (pixel) on the screen into -memory and requiring the storage of about a quarter-million dots, a -much more efficient method of storage is used. +<sect1> Terminal Memory Details <label id="term_mem_detail"> +<p> The +terminal screen refreshes itself at perhaps 60 times per second from +an image stored in the memory of the terminal. For a PC the monitor's +image is stored on the video card inside the computer but for a +terminal, the equivalent of the video card is inside the terminal. +For a text terminal the storage of the image uses little memory. +Instead of putting every dot (pixel) on the screen into memory and +requiring the storage of about a quarter-million dots, a much more +efficient method of storage is used. A screen-full of text may be represented inside the terminal memory by -ASCII bytes, one for each character on the screen. An entire -screen only takes about 2K ASCII bytes. To display these characters, -the terminal must also know the bit-map (the shape) of each of the -almost 100 printable ASCII characters. With a bit-map of a character -using say 15 bytes, only about 1.5K of memory is needed for the -bit-maps of all the ASCII characters (the font). This ASCII text and -font memory is scanned so that the resulting image is put on the -screen about 60 times each second. This is a form of shared memory -where a single bit-map of a letter such as the letter e, is shared by -all of the many letter e's which appear on a screen-full of text. Low -memory requirements meant low costs to produce monitors in the early -1980's when the cost of memory was several thousand times higher than -it is today (costing then several dollars per kilobyte). +ASCII bytes, one for each character on the screen. An entire screen +only takes about 2K ASCII bytes. To display these characters, the +terminal must also know the bit-map (the shape) of each of the almost +100 printable ASCII characters. With a bit-map of a character using +say 15 bytes, only about 1.5K of memory is needed for the bit-maps of +all the ASCII characters (the font). This ASCII text and font memory +is scanned so that the resulting image is put on the screen about 60 +times each second. This is a form of shared memory where a single +bit-map of a letter such as the letter e, is shared by all of the many +letter e's which appear on a screen-full of text. Low memory +requirements meant low costs to produce monitors in the early 1980's +when the cost of memory was several thousand times higher than it is +today (costing then several dollars per kilobyte). -<sect1> Early Terminals <label id="early_terms"> -<p> The first terminals were something like remotely controlled -typewriters which could only "display" (print on paper) the character -stream sent to them from the computer. The earliest models were -called <ref id="teletype" name="Teletypes">. The name "tty" is just -an abbreviation for "Teletype". Early terminals could do a line feed +<sect1> Early Terminals <label id="early_terms"> +<p> The first +terminals were something like remotely controlled typewriters which +could only "display" (print on paper) the character stream sent to +them from the computer. The earliest models were called <ref +id="teletype" name="Teletypes">. The name "tty" is just an +abbreviation for "Teletype". Early terminals could do a line feed and a carriage return just like a typewriter and ring a bell when a bell character was received. Due to the lack of significant capabilities this was the first type of terminal to be labeled "dumb". @@ -1133,45 +1163,47 @@ This type of terminal interface (using a terminal type called "dumb") is sometimes used today when the computer can't figure out what kind of a terminal it is communicating with. -<sect1> Escape Sequences and Control Codes (intro) -<p> Terminals have many capabilities some of which are always present -and some of which require commands from the computer to change or -activate. To exercise all these capabilities under the control of the -computer requires that special codes be established so that the -computer can tell the terminal what to do. There are two major type -of such codes: escape sequences and control codes (control -characters). There are many times more escape sequences than control -codes. +<sect1> Escape Sequences and Control Codes (intro) +<p> Terminals have +many capabilities some of which are always present and some of which +require commands from the computer to change or activate. To exercise +all these capabilities under the control of the computer requires that +special codes be established so that the computer can tell the +terminal what to do. There are two major type of such codes: escape +sequences and control codes (control characters). There are many +times more escape sequences than control codes. -<sect2> Control codes <label id="control_codes"> -<p> The control codes (or control characters) consist of the first 32 -bytes of the ASCII alphabet. They include the following: -carriage-return (cursor to far left), line-feed (cursor down one line), -backspace, escape-character, tab, and bell. They do not normally -show on the screen. There is usually a command which you may give to -your terminal which will result in them being displayed when they are -received by the terminal. It's called something like "Display Controls" -or "Monitor". If you do this then the display may look a mess since -escape sequences, which all start with the ESC (escape) control -character, are no longer executed. Words which should appear at the -top or bottom of the screen will show up in other locations. The -escape sequences to reposition the cursor display on the screen but -the cursor doesn't move to where the escape sequence says. +<sect2> Control codes <label id="control_codes"> +<p> The control +codes (or control characters) consist of the first 32 bytes of the +ASCII alphabet. They include the following: carriage-return (cursor +to far left), line-feed (cursor down one line), backspace, +escape-character, tab, and bell. They do not normally show on the +screen. There is usually a command which you may give to your +terminal which will result in them being displayed when they are +received by the terminal. It's called something like "Display +Controls" or "Monitor". If you do this then the display may look a +mess since escape sequences, which all start with the ESC (escape) +control character, are no longer executed. Words which should appear +at the top or bottom of the screen will show up in other locations. +The escape sequences to reposition the cursor display on the screen +but the cursor doesn't move to where the escape sequence says. -<sect2> Escape sequences <label id="esc_seq"> -<p> Since there are not nearly enough control codes to do everything -(and for some reason, not all of them are utilized) many escape -sequences are used. They consist of the "escape" (ESC) control -character followed by a sequence of ordinary characters. Upon -receiving an escape character, the terminal examines the characters -following it so that it may interpret the sequence and carry out the -intended command from the computer. Once it recognizes the end of a -valid sequence, further characters received just display on the screen -(unless they are control codes or more escape sequences). Some escape -sequences may take parameters (or arguments) such as the coordinates -on the screen to move the cursor to. The parameters become a part of -the escape sequence. An <ref id="esc_seq_lists" name="Esc Sequence -List"> is on the web for some terminals, but it's terse. +<sect2> Escape sequences <label id="esc_seq"> +<p> Since there are not +nearly enough control codes to do everything (and for some reason, not +all of them are utilized) many escape sequences are used. They +consist of the "escape" (ESC) control character followed by a sequence +of ordinary characters. Upon receiving an escape character, the +terminal examines the characters following it so that it may interpret +the sequence and carry out the intended command from the computer. +Once it recognizes the end of a valid sequence, further characters +received just display on the screen (unless they are control codes or +more escape sequences). Some escape sequences may take parameters (or +arguments) such as the coordinates on the screen to move the cursor +to. The parameters become a part of the escape sequence. An <ref +id="esc_seq_lists" name="Esc Sequence List"> is on the web for some +terminals, but it's terse. A list of the escape sequences for your terminal should be in the "programmers manual" for the terminal. Except for very old terminals, @@ -1190,12 +1222,13 @@ does not list all of the escape sequences which the terminal has available for use, but fortunately, the most important ones are usually there. -<sect1> Display Attributes & Magic Cookies <label id="display_attributes"> -<p> Terminals have various methods of generating character attributes -such as bold, reverse-video, underlining, etc. There should be -no need for the user to worry about how this is done, except that -it creates problems for some old terminals and there is sometimes an -option for this in the set-up menu of newer terminals. +<sect1> Display Attributes & Magic Cookies <label +id="display_attributes"> <p> Terminals have various methods of +generating character attributes such as bold, reverse-video, +underlining, etc. There should be no need for the user to worry about +how this is done, except that it creates problems for some old +terminals and there is sometimes an option for this in the set-up menu +of newer terminals. The magic cookie method is obsolete. It's the simplest (and worst) method of defining attributes: Use a certain byte for the start of an @@ -1213,13 +1246,13 @@ by PC video cards (for text) for the common PC monitor. <sect> Special Features of Some Terminals -<sect1> Color -<p> While the common monochrome terminal is not a color terminal it -may have a fixed "color" display other than white such as green or -amber. All terminals have black (electron beam turned off = zero -brightness). A real color terminal can change the color of the text -and background to many different colors while a monochrome terminal -can only change the brightness of a fixed color. +<sect1> Color +<p> While the common monochrome terminal is not a color +terminal it may have a fixed "color" display other than white such as +green or amber. All terminals have black (electron beam turned off = +zero brightness). A real color terminal can change the color of the +text and background to many different colors while a monochrome +terminal can only change the brightness of a fixed color. However, changing the brightness, etc. gives a lot of possibilities. For example, a black and white (monochrome) terminal can have white, @@ -1227,49 +1260,49 @@ grey, and black by varying the brightness. Some words can be black on a light grey background while other are highlighted by black on white. In addition there is white on black, underlining, and blinking. -Color works like the color on a computer monitor or TV screen. -The CRT has three colors of dots on it with each color controlled by -its own electron beam (3 beams). Monochrome has inherently better +Color works like the color on a computer monitor or TV screen. The +CRT has three colors of dots on it with each color controlled by its +own electron beam (3 beams). Monochrome has inherently better resolution since it doesn't depend on dots permanently fixed on the screen. For text terminals the only use of color is to differentiate text and this advantage is not always worth the cost of worse resolution. Thus monochrome may be better since it also costs less. -<sect1> Multiple Sessions -<p> For dual sessions the terminal has two serial ports of equal -status. Each port is connected to a serial port on a different -computer. Thus one may log in to two different computers with each -session displaying in a split-screen window. Alternatively, each -session may run full-screen with a "hot" key (or the like) to switch -between sessions. One could also connect to two different serial -ports on the same computer and log in twice (similar to "virtual -terminals" at the console). The program "screen" will make any -ordinary terminal (single session) connected to a single computer run -two or more "sessions". +<sect1> Multiple Sessions +<p> For dual sessions the terminal has two +serial ports of equal status. Each port is connected to a serial port +on a different computer. Thus one may log in to two different +computers with each session displaying in a split-screen window. +Alternatively, each session may run full-screen with a "hot" key (or +the like) to switch between sessions. One could also connect to two +different serial ports on the same computer and log in twice (similar +to "virtual terminals" at the console). The program "screen" will +make any ordinary terminal (single session) connected to a single +computer run two or more "sessions". -<sect1> Printer/Auxiliary Port -<p> Many terminals have a connector on the rear for such a port. It -may be labeled as "Aux" or "Printer", etc. Some printer ports are for -parallel printers while others are for serial printers. If a printer -is connected to the printer or auxiliary port, then pressing certain -keys will print the screen. One may also have everything that -displays on the screen go also to the printer. If the port is an -auxiliary port, one may connect this to another computer and almost -have dual sessions as above. However, the video memory inside the -terminal may not retain both sessions so you may need to refresh the -screen when switching to the other session. There will likely not be -a hot key either but possibly a programmable function key may be -programmed to do this. There exists various key combinations and -escape sequences for controlling such a port. See <ref -id="printer_esc" name="Printer Esc">. +<sect1> Printer/Auxiliary Port +<p> Many terminals have a connector on +the rear for such a port. It may be labeled as "Aux" or "Printer", +etc. Some printer ports are for parallel printers while others are +for serial printers. If a printer is connected to the printer or +auxiliary port, then pressing certain keys will print the screen. One +may also have everything that displays on the screen go also to the +printer. If the port is an auxiliary port, one may connect this to +another computer and almost have dual sessions as above. However, the +video memory inside the terminal may not retain both sessions so you +may need to refresh the screen when switching to the other session. +There will likely not be a hot key either but possibly a programmable +function key may be programmed to do this. There exists various key +combinations and escape sequences for controlling such a port. See +<ref id="printer_esc" name="Printer Esc">. There is a program called <tt/vtprint/ which is designed to send a print job (text only) to your terminal to be printed on a printer attached to the terminal. It's homepage is <tt><url -url="http://vtprint.sourceforge.net/" name="vtprint"></tt>. -It's also included in the Debian distribution of Linux. <tt/xprt/ -(also in Debian) seems to do something similar, but only for X Window -terminals ?? +url="http://vtprint.sourceforge.net/" name="vtprint"></tt>. It's also +included in the Debian distribution of Linux. <tt/xprt/ (also in +Debian) seems to do something similar, but only for X Window terminals +?? Using the printer port to print may be useful if you don't have an extra port on your PC for a printer or for "point of sale" use in a @@ -1280,16 +1313,16 @@ Wyse) it's "bidirectional mode". The Wyse "auxiliary print mode" is just transparent print mode where the terminal screen monitors what's being printed. -<sect1> Pages <label id="pages_"> -<p> Many terminals permit the storage of more than one page in their -video memory. Sometimes the page size is the same as the screen, but -sometimes it is larger so that scrolling will reveal unseen parts of a -page. So when one looks at a screen, there may be hidden text on the -same page above or below the display. In addition, if there is more -than just one page, there may be hidden text on these other pages. -One use for pages is on terminals that support dual sessions. Each -session may have its own page and one may switch back and forth -between them. +<sect1> Pages <label id="pages_"> +<p> Many terminals permit the +storage of more than one page in their video memory. Sometimes the +page size is the same as the screen, but sometimes it is larger so +that scrolling will reveal unseen parts of a page. So when one looks +at a screen, there may be hidden text on the same page above or below +the display. In addition, if there is more than just one page, there +may be hidden text on these other pages. One use for pages is on +terminals that support dual sessions. Each session may have its own +page and one may switch back and forth between them. Even if you only have a one-page-terminal with the page sized equal to what is displayed on the screen, you will still see other pages of a @@ -1311,10 +1344,10 @@ page-like window for each running program. <p> A character-set is normally represented by a list (or table or chart) of characters along with the byte code assigned to each character. The codes for a byte range from 0 to 255 (00 to FF in -hexadecimal). In MS-DOS, character-set tables are called "code-pages". -You should examine such a table if you're not familiar with them. -They are sometimes included in printer and terminal manuals but also -are found on the Internet. +hexadecimal). In MS-DOS, character-set tables are called +"code-pages". You should examine such a table if you're not familiar +with them. They are sometimes included in printer and terminal +manuals but also are found on the Internet. Many character sets include letters from foreign languages. But they may also include special characters used to draw boxes and other @@ -1345,46 +1378,43 @@ KOI8-R is more commonly used for Russian than IS0-8859-5. Unicode is a very large character-set where each character is represented by 2 bytes instead on just one byte. -More info re character-sets are: +More info re character-sets are: <itemize> -<item> Manual pages: charsets, iso_8859-l or latin1 (covers 8859 - series), ascii +<item> Manual pages: charsets, iso_8859-l or latin1 (covers 8859 series), ascii <item> HOWTO's for various languages (often written in that language). <item> <url url="http://czyborra.com/charsets/iso8859.html" name="ISO-8859 Alphabet Soup"> More than just iso8859. Extensive. <item> <url url="http://www.cs.tut.fi/~jkorpela/chars.html" name="A tutorial on character code issues"> Clearly written. <item> <url url="http://www.w3.org/International/O-charset-lang.html" - name="Languages, Countries and Character Sets"> -<item> <url url="http://www.osk.3web.ne.jp/logos/" - name="Languages of the World by Computers ..."> -<item> <url url="http://linux.monnet.ru/books/locale/locale_i.html" -name="Links re Internationalization"> A long list of links (in Russian -but most words in English). -<item> <url url="ftp://kermit.columbia.edu/kermit/e/isok7.txt" -name="... International Character Sets"> +name="Languages, Countries and Character Sets"> +<item> <url url="http://www.osk.3web.ne.jp/logos/" name="Languages of +the World by Computers ..."> +<item> <url url="ftp://kermit.columbia.edu/kermit/e/isok7.txt" name="... +International Character Sets"> </itemize> Once you've found the character set name (or alpha-numeric designation) you are interested in, you may search for more info about it on the Internet. -<sect2> Graphics (Line Drawing, etc.) -<p> There are special characters for drawing boxes, etc. There are -also numerous non-ASCII symbols such as bullets. These may either be -part of an 8-bit character set (such as WinLatin1 = CP-1252) or -provided as a separate font (in vt100 terminals). Your terminfo may -be set up to use them. But if you see a row of letters when there -should be a line, it may mean that terminfo hasn't implemented them. +<sect2> Graphics (Line Drawing, etc.) +<p> There are special characters +for drawing boxes, etc. There are also numerous non-ASCII symbols +such as bullets. These may either be part of an 8-bit character set +(such as WinLatin1 = CP-1252) or provided as a separate font (in vt100 +terminals). Your terminfo may be set up to use them. But if you see +a row of letters when there should be a line, it may mean that +terminfo hasn't implemented them. -You need to know the following if your graphics don't work right. -The default graphic character set is the vt-100 ANSI graphics. -Otherwise the string acsc must be defined in your terminfo. It -establishes a map between the vt-100 graphic characters codes and the -actual codes used on your terminal. So even if your terminal doesn't -have the vt-100 graphics, it can likely still generate such graphics -with some other character set. If terminfo has it right, this will -happen automatically. +You need to know the following if your graphics don't work right. The +default graphic character set is the vt-100 ANSI graphics. Otherwise +the string acsc must be defined in your terminfo. It establishes a +map between the vt-100 graphic characters codes and the actual codes +used on your terminal. So even if your terminal doesn't have the +vt-100 graphics, it can likely still generate such graphics with some +other character set. If terminfo has it right, this will happen +automatically. If character sets must be switched then the terminfo variables: enacs, rmacs, and smacs should be defined. Note acs = Alternate Character @@ -1392,11 +1422,12 @@ Set. Even if the upper half of the normal character set contains the graphic characters it may be considered a separate 7-bit character set that needs to be switched to. -<sect2> National Replacement Characters (obsolete) -<p> In the 1960's, the ASCII 7-bit code was devised to map 7-bit bytes -to English letters, numbers, punctuation marks, etc. Other countries -adopted ASCII, but most of them had some additional letters which were -not present in the ASCII code. What to do? Various people decided to +<sect2> National Replacement Characters (obsolete) +<p> In the 1960's, +the ASCII 7-bit code was devised to map 7-bit bytes to English +letters, numbers, punctuation marks, etc. Other countries adopted +ASCII, but most of them had some additional letters which were not +present in the ASCII code. What to do? Various people decided to purge certain symbols (such as ^, }) from ASCII and to substitute national letters (ones with dots over them, etc.) for the ASCII letters. In other words they replaced ASCII letters with "National @@ -1477,11 +1508,8 @@ soft-font. This means that they can display almost any character set provided that you can find the soft-font for it. If you can't find the needed soft-font, you can always create your own. A free font editor for this is called BitFontEdit (written by the author of this -document) and (in 1998) was at<newline> -Europe: <url - url="http://www.funet.fi/pub/culture/russian/comp/cyril-term/"><newline> -N. America: <url - url="http://ibiblio.unc.edu/pub/Linux/utils/terminal/"> +document) and is at at<newline> +<url url="http://www.ibiblio.org/pub/Linux/utils/terminal/"><newline> For mapping the keyboard (and screen) for use of various fonts see <ref id="mapchan_" name="Character Mapping: mapchan"> @@ -1524,7 +1552,7 @@ sends a carriage return to the host which normally get translated to a new-line character by the host's device driver. On some terminals it may be set up to send something else. -<item> F1, F2, ... or PF1, PF2, ... are function keys which usually +<item> F1, F2, ... or PF1, PF2, ... are function keys which sometimes may be programmed to send out a sequence of bytes (characters). See <ref id="funct_keys" name="Function Keys"> </itemize> @@ -1547,32 +1575,49 @@ power to make the PC computer behave like a text terminal. This is one type of terminal emulation. Another type of terminal emulation is where you set up a real terminal to emulate another brand/model of terminal. To do this you select the emulation you want (called -"personality" in Wyse jargon) from the terminal's set-up menu. This -section is about the first type of emulation: emulating a terminal on -a PC. +"personality" in Wyse jargon) from the terminal's set-up menu. -In emulation, one of the serial ports of the computer will be used to -connect the emulated terminal to another computer, either with a -direct cable connection from serial port to serial port, or via a -modem. Emulation provides more that just a terminal since the PC -doing the emulation can also do other tasks at the same time it's -emulating a terminal. For example, kermit or zmodem may be run on the -PC to enable transfer of files over the serial line (and possibly over -the phone line via a modem) to the other computer that you are -connected to. The emulation needs only to be run on one of the virtual -consoles of the PC, leaving the other virtual consoles available for -using the PC in command-line-interface. +To fully emulate a real terminal on a PC requires that the serial +ports of the computer will be used to connect the emulated terminal to +another computer. This would be either with a direct cable connection +from serial port to serial port, or via a modem. But in other cases, +the serial port will not be used directly as the interface. Instead, +the interface may be a network and the flow of bytes to and from the +terminal will travel in network packets via either a modem on a serial +port or via and ethernet port. + +Still another case (and by far the most common case of emulation) is +just using the computer monitor in text mode or using an X Window +xterm window (also text mode) to interact with the same computer. +Here the interface between the "terminal" and computer is mainly just +a couple of buffers in memory that temporarily store what you type and +what the software you're running wants you to see. The name of this +interface is just the device name like <tt>/dev/tty1</tt>. Characters +written into these buffers are almost instantaneously removed to be +either displayed on the screen or sent to your application program +(from the keyboard). The terminal you are emulating here is of type +"Linux" and it configures automatically. + +Emulation for connection to a remote computer provides more that just +a real text-terminal since the PC doing the emulation can also do +other tasks at the same time it's emulating a terminal. For example, +for serial port connections, kermit or zmodem may be run on the PC to +enable transfer of files over the serial line (and possibly over the +phone line via a modem) to the other computer that you are connected +to. The emulation needs only to be run on one of the virtual consoles +of the PC, leaving the other virtual consoles available for using the +PC in command-line-interface. Much emulation software is available for use under the MS Windows OS. See <ref id="non_linux_pc" name="Make a non-Linux PC a terminal"> This can be used to connect a Windows PC to a Linux PC (as a Text-Terminal). Most Linux free software can only emulate a VT100, -VT102, or VT100/ANSI. If you find out about any others, let me know. -Since most PC's have color monitors while VT100 and VT102 were -designed for a monochrome monitor, the emulation usually adds color -capabilities (including a choice of colors). Sometimes the emulation -is not 100% perfect but this usually causes few problems. For using a -Mac computer to emulate a terminal see the mini-howto: Mac-Terminal. +VT102, or VT100/ANSI, or Wyse60 (not fully). If you find out about +any others, let me know. Since most PC's have color monitors while +VT100 and VT102 were designed for a monochrome monitor, the emulation +usually adds color capabilities (including a choice of colors). +Sometimes the emulation is not 100% perfect but this usually causes +few problems. None of them provide programmable function keys. <sect1> Don't Try to Use TERM Variable for Emulation <label id="term_not_for_emulation"> @@ -1582,38 +1627,46 @@ to the type of terminal they would like to emulate. This does not work. The value of TERM only tells an application program what terminal you are using. This way it doesn't need to interactively ask you this question. If you're at a Linux PC monitor (command line -interface) it's a terminal of type "Linux" and your can't change this. -So you must set TERM to "Linux". +interface) it's a terminal of type "Linux" and since you can't change this +TERM must be set to "Linux". This should happen without you needing to +do anything. -If you set it to something else you are fibbing to application -programs. As a result they will incorrectly interpret certain escape +If you set it to something else you are fibbing to an application +program. As a result, it will incorrectly interpret certain escape sequences from the console resulting in a corrupted interface. Since the Linux console behaves almost like a vt100 terminal, it could still work almost OK if you falsely claimed it was a vt100 (or some other -terminal which is something like a vt100). It may seeming work OK -most of the time but once in a while will make a mistake when editing -or the like. +terminal which is close to a vt100). In this case it may seeming work +OK most of the time but once in a while will make a mistake. -<sect1> Communication (Dialing) programs -<p> Dialing programs for making a PPP connection to the Internet don't -normally include any terminal emulation. But some other modem dialing -programs (such as minicom or seyon) do. Using them, one may (for -example) dial up some public libraries to use their catalogs and -indexes, (or even read magazine articles). They are also useful for -testing modems. Seyon is only for use with X Window and can emulate -Tektronix 4014 terminals. +<sect1> Serial Communication (Dialing) programs +<p> Dialing programs for making a PPP connection to the Internet such +as wvdial, don't normally include any terminal emulation. But some +other programs (such as minicom or seyon) do both terminal emulation +and modem dialing (without PPP so it's not easy to use them to +connect to the internet). The program "picocom" just does terminal +emulation although it's possible to type in a modem command and a +phone number to dial out manually. Using them, one may (for example) +dial up some public libraries to use their catalogs and indexes, (or +even read magazine articles). They are also useful for testing +modems. Seyon is only for use with X Window and can emulate Tektronix +4014 terminals. -The communication program Kermit doesn't do terminal emulation as it -is merely a semi-transparent pipe between whatever terminal you are on +The communication program C-Kermit (sometimes just called kermit) +doesn't do terminal emulation for Linux (in 2006). But Kermit can +emulate many terminals in its MS Windows versions so you`ll see lots +of claims that Kermit can do terminal emulation. With Linux, it's +merely a semi-transparent pipe between whatever terminal you are on and the remote site you are connected to. Thus if you use kermit on a Linux PC the terminal type will be "Linux". If you have a Wyse60 -connected to your PC and run kermit on that, you will appear as a +connected to your PC and run kermit from that, you will appear as a Wyse60 to the remote computer (which may not be able to handle Wyse60 terminals). Minicom emulates a VT102 and if you use it on Wyse60 -terminal VT102 escape sequences coming into your computer's serial -port from a remote computer will get translated to the Wyse escape -sequences before going out another serial port to your Wyse60 -terminal. Kermit can't do this sort of thing. +terminal vt102 the remote host will think you are a vt102 and send you +vt102 escape sequences. These will flow into your computer's serial +port and will get translated to the Wyse escape sequences before going +out another serial port on your computer to your Wyse60 terminal. +C-Kermit can't do this sort of thing. Emulators exist under DOS such as <tt/telix/ and <tt/procomm/ work just as well. The terminal emulated is often the old VT100, VT102, or @@ -1648,7 +1701,7 @@ to help determine if a terminal behaves correctly like a vt53, vt100, vt102, vt220, vt320, vt420 etc. There is no documentation but it has menus and is easy to use. To compile it run the configure script and then type "make". It may be downloaded from: <url -url="http://ibiblio.unc.edu/pub/Linux/utils/console/"> +url="http://www.ibiblio.org/pub/Linux/utils/console/"> <sect1> The Linux Console <label id="console_"> <p> The console for a PC Linux system is normally the computer monitor @@ -1701,21 +1754,25 @@ Unfortunately, much of this documentation is outdated. <p> Emulators often don't work quite right so before purchasing software you should try to throughly check out what you will get. -<sect2> Make a Linux PC a terminal +<sect2> Make a Linux PC a serial port terminal <p> Unless you want to emulate the standard vt100 (or close to it) or a Wyse 60, there doesn't seem to be much free terminal emulation -software available for Linux. The free programs minicom and seyon -(only for X Window) can emulate a vt100 (or close to it). Seyon can -also emulate a Tektronix 4014 terminal. See <url +software available for Linux. The free programs minicom, picocom, and +seyon (only for X Window) can emulate a vt100 (or close to it). +Seyon can also emulate a Tektronix 4014 terminal. See <url url="http://gutschke.com/wy60/" name="Wyse 60 emulator"> -Minicom may be used to emulate a directly connected terminal by simply -starting minicom (after configuring it for the serial port used). Of -course, you don't dial out and when you want to quit (after you logout -from the other PC) you use minicom's q command to quit without reset -since there is no modem to reset. When minicom starts, it -automatically sends out a modem init string to the serial port. But -since there's no modem there, the string gets put after the +Minicom or picocom may be used to emulate a directly connected +terminal by simply starting one of them. For minicom, you must +configure it for the serial port used). Picocom is a mini-minicom, +doesn't have automatic dialout capability. + +Skip this paragraph if you use picocom. For the case of minicom you +obviously don't try to dial-out. When you want to quit minicom (after +you logout from the other PC) you use minicom's q command to quit +without reset since there is no modem to reset. When minicom starts, +it automatically sends out a modem init string to the serial port. +But since there's no modem there, the string gets put after the "login:" prompt. If this string is mostly capital letters, the getty program (which runs login) at the other PC may think that your terminal has only capital letters and try to use only capital letters. @@ -1724,7 +1781,7 @@ null (erase the init strings). The terminal emulator "Procomm" (which is from Dos), can be used on a Linux PC if you run dosemu to emulate Dos. For details see: <url -url="http://solarflow.dyndns.org/pcplus/">. +url="http://www.symantec.com/procomm/">. There's a specialized Linux distribution: Serial Terminal Linux. It will turn a PC to into a minicom-like terminal. It's small (fits on a @@ -1740,13 +1797,38 @@ name="Terminal Emulator"> can emulate Wyse60, 50; VT 220, 102, 100, 52: TV950, 925, 912; PCTERM; ANSI; IBM3101; ADM-1l; WANG 2110. Block mode is available for IBM and Wyse. It runs on a Linux PC. +<sect2> Make a Linux PC an IBM network terminal +<p>This happens automatically when you run programs like telnet or +ssh, provided of course that your computer is connected to a network +(perhaps via a modem). Telnet normally uses a network (often the +Internet) to connect your console, which emulates a terminal of type +"Linux", to a remote computer for you to log in to. However, there +are some free programs that allow you to use telnet with IBM terminal +emulation on your PC to connect with IBM mainframes. + +One IBM program emulates an IBM tn5250 terminal and printer and +another emulates an IBM c3270. There's also one that emulates an IBM +pr3287 printer (the mainframe thinks it's connected to the printer). +The Debian distribution has these. It's reported that the tn5250 +emulates a vt keyboard under Linux and not a 5250 keyboard like it +should. Also, it's reported that the documentation and keyboard +mapping for the MS Windows version are better than for the Linux +version. + <sect2> Make a non-Linux PC a terminal <label id="non_linux_pc"> <p> Emulators exist which run on non-Linux PCs. They permit you to use a non-Linux-PC as a terminal connected to a Linux-PC. Under DOS -there is <tt/telix/ and <tt/procomm/. Windows comes with -"HyperTerminal" (formerly simply called "Terminal" in Windows 3.x and -DOS). Competing with this is "HyperTerminal Private Edition" <url +there were many programs that not only emulated a terminal but let you +dial out with a modem so that you could connect to other computers +over telephone lines (without getting connected to the Internet). Of +historical interest is <url +url="http://www.byte.com/art/9402/sec8/art1.htm" name="DOS Serial +Communications (1994)">. + +Today Windows comes with "HyperTerminal" (formerly simply called +"Terminal" in Windows 3.x and DOS). Competing with this is +"HyperTerminal Private Edition" <url url="http://www.hilgraeve.com/htpe/index.html"> which is non-free to business. It can emulate vt-220. The Windows "terminals" are intended for calling out with a modem but they should also work as @@ -1754,10 +1836,20 @@ directly connected terminals?? Turbosoft's TTWin can emulate over 80 different terminals under Windows. See <url url="http://www.ttwin.com/"> or <url url="http://www.turbosoft.com.au/"> (Australia). See also <url -url="http://www.wrq.com/" name="Reflection"> +url="http://www.wrq.com/" name="WRQ"> -For the Mac Computer there is emulation by Carnation Software <url -url="http://www.carnationsoftware.com/carnation/HT.Carn.Home.html"> +For using a Mac computer to emulate a common terminal use either +Linux's "minicom" (ported to the Mac OS X) or the old "zterm" +(shareware). For very old Macs prior to OS X, see the mini-howto: +Mac-Terminal. <url +url="http://www.carnationsoftware.com/carnation/HT.Carn.Home.html" +name="Carnation Software"> has non-free software to emulate a wide +variety of terminals on a Mac. Mac OS X has a "terminal" program that +gives you a terminal window just like the xterm window in Linux's X +Window. In that window you may run "minicom" (if it's available). +Both the "fink" and "darwinports" projects have ported minicom to the +Mac, but they may not have the most recent version and you might need +to compile minicom yourself. One place to check terminal emulation products is Shuford's site, but it seems to lists old products (which may still work OK). The fact @@ -1966,24 +2058,24 @@ control is the same as DTR/DSR flow control but it's only one-way and the DSR pin is not used. For DTR/DSR flow control at a terminal, the DTR signal is like the signal sent from the RTS pin and the DSR pin is just like the CTS pin. -null modem (crossover) -<sect2> Connecting up DTR or DTR/DSR Flow Control <p> Some terminals -use only DTR flow control. This is only one-way flow control to keep -the terminal from being overrun. It doesn't protect the computer from -someone typing too fast for the computer to handle it. In a standard -file-transfer serial cable the DTR pin at the terminal is connected to -the DSR pin at the computer. But Linux doesn't support DTR/DSR flow -control (although drivers for some multiport boards may support -DTR/DSR flow control.) A way around this problem is to simply wire -the DTR pin at the terminal to connect to the CTS pin at the computer -and set RTS/CTS flow control (stty crtscts). The fact that it's only -one way will not affect anything so long as the host doesn't get -overwhelmed by your typing speed and drop RTS in a vain attempt to -lock your keyboard. See <ref id="keybrd_lock" name="Keyboard Lock">. -For DTR/DSR flow control (if your terminal supports this two-way flow -control) you do the above. But you also connect the DSR pin at the -terminal to the RTS pin at the computer. Then you are protected if -you type too fast. + +<sect2> Connecting up DTR or DTR/DSR Flow Control +<p> Some terminals use only DTR flow control. This is only one-way +flow control to keep the terminal from being overrun. It doesn't +protect the computer from someone typing too fast for the computer to +handle it. In a standard file-transfer serial cable the DTR pin at +the terminal is connected to the DSR pin at the computer. But Linux +doesn't support DTR/DSR flow control (although drivers for some +multiport boards may support DTR/DSR flow control.) A way around this +problem is to simply wire the DTR pin at the terminal to connect to +the CTS pin at the computer and set RTS/CTS flow control (stty +crtscts). The fact that it's only one way will not affect anything so +long as the host doesn't get overwhelmed by your typing speed and drop +RTS in a vain attempt to lock your keyboard. See <ref +id="keybrd_lock" name="Keyboard Lock">. For DTR/DSR flow control (if +your terminal supports this two-way flow control) you do the above. +But you also connect the DSR pin at the terminal to the RTS pin at the +computer. Then you are protected if you type too fast. <sect2> Old RTS/CTS handshaking is different <p> What is confusing is that there is the original use of RTS where @@ -2353,7 +2445,7 @@ there is work being done to incorporate callback features into it and thus make it able to dial-out. As of early 1999 it didn't seem to have been done. -<sect1> Telnet +<sect1> Telnet and ssh <p>Telnet is a program which lets a text terminal (or a PC console) connect to a host computer over a network. No serial ports are used for the telnet connection. Of course if you are sitting at a real @@ -2367,6 +2459,30 @@ on another computer on a network. Then you get a login prompt and log in just as if you were directly connected via a cable to a serial port. +Ssh is "Secure Shell" and is like telnet. At one time it was much +more secure than the conventional telnet which sent passwords in the +clear (no encoding). But now (2006) there are packages "telnet-ssl" +which offer secure telnet. But since telnet was slow in introducing +security, ssh may have become more popular. + +Telnet may put each character you type inside a packet and naturally +there's a lot of overhead with this. But there's an option for sending +one line at a time. To use telnet as a client, you need to have an +account on another computer on that runs a telnet server. Then you +give the telnet command and specify the address of the computer that +will accept a connection from you. + +What kind of terminal does telnet emulate? It doesn't. Instead, it +connects you to a remote computer using whatever kind of terminal you +are currently using. If you're on a Linux console, it's a terminal of +type Linux. The remote computer needs to somehow find out what type +of terminal you're on so it can send the correct escape sequences. + +So using telnet is much like connecting up a dumb terminal to a serial +port except that instead of a cable between you and the computer, +there is a stream of packets flowing over the Internet between you and +some distant computer. + <sect1> Terminal Server Connection <sect2> What is a terminal server ? <p> A terminal server is something that serves to connect a bunch of @@ -3449,16 +3565,17 @@ set this to off. <p> These are the keys labeled F1, F2, etc. On older terminals they may be labeled PF1, PF2, etc. where the P stands for Programmable. Some keyboards have both. One may program (redefine) these keys to -send out a string of user-defined bytes. They may often be easily -"programmed" using a certain set-up menu {FKey}. On some terminals, -one may also specify where this string is sent to when the key is -pressed. In "normal" mode, pressing the key is just like typing the -string at the keyboard. In "local" mode pressing the key sends it to -the terminal (just like if the terminal was in local mode). This may -be used to send escape sequences to the terminal so as to configure it -in a special way. In "remote" mode, the string is always sent out the -serial port to the host computer (even if the terminal is in local -mode). +send out a string of user-defined bytes. This doesn't work for older +terminals such as vt100 or for the Linux command-line interface (how +sad). They may often be easily "programmed" using a certain set-up +menu {FKey}. On some terminals, one may also specify where this +string is sent to when the key is pressed. In "normal" mode, pressing +the key is just like typing the string at the keyboard. In "local" +mode pressing the key sends it to the terminal (just like if the +terminal was in local mode). This may be used to send escape +sequences to the terminal so as to configure it in a special way. In +"remote" mode, the string is always sent out the serial port to the +host computer (even if the terminal is in local mode). <sect1> Block Mode Options <p> Some options are only for the case of <ref id="block" name="Block @@ -3546,9 +3663,10 @@ The arguments which are permitted depend on which getty you use:<newline> Two gettys best for directly connected terminals are: <enum> -<item> agetty (sometimes just called getty): Very easy to set up. No config - files. See <ref id="agetty_" name="agetty"> -<item> <ref id="getty_ps" name="getty (part of getty_ps)"> +<item> agetty (sometimes just called getty): Easy to set up with no config +required. See <ref id="agetty_" name="agetty"> +<item> <ref id="getty_ps" name="getty (part of getty_ps)"> More +advanced with config file. </enum> Two gettys best for dial-in modems (avoid for directly connected terminals) are: @@ -3565,27 +3683,27 @@ Linux users use one of these at their monitor: <item> rungetty </enum> -Your Linux distribution may come with either ps_getty or agetty for +Your Linux distribution may come with either getty_ps or agetty for text-terminals. Some distributions supply neither. Unfortunately, -they often just call it "getty" so you may need to determine which one -you have since the arguments you put after it in /etc/inittab differ. -Debian uses agetty (in the util-linux package). RedHat and Fedora -used ps_getty which is at: <url -url="http://rpmfind.net/linux/rpm2html/search.php?query=getty_ps&submit=Search+...&system=&arch=" name="ps_getty"> +they often just call it "getty". If you need to determine which one +you have look at the man page for "getty". As of 2007 agetty (in the +"util-linux package) seems to be more widely used then getty_ps which +was at: +<url +url="http://rpmfind.net/linux/rpm2html/search.php?query=getty_ps&subm" +name="getty_ps"> As a last resort to try to determine which getty you have, you might -check out its executable code (usually in /sbin). ps_getty has +check out its executable code (usually in /sbin). getty_ps has /etc/gettydefs embedded in this code. To search for it, go to /sbin and type:<newline> <tt>strings getty | grep getty </tt><newline> If getty is actually agetty the above will result in -nothing. However if you have agetty typing:<newline> <tt>getty --h</tt><newline> should show the options [-hiLmw]. +nothing. However if you have agetty typing:<newline> +<tt>getty -h</tt><newline> should show the agetty options [-hiLmw]. -If you don't have the getty you want check other distributions and the -<tt/alien/ program to convert between RPM and Debian packages. The source -code may be downloaded from <url url= -"http://ibiblio.unc.edu/pub/Linux/system/serial/getty/" name="Getty +The source codes for various gettys may be downloaded from <url url= +"http://ibiblio.org/pub/Linux/system/serial/getty/" name="Getty Software">. If you are not using modem control lines (for example if you only use @@ -3648,7 +3766,7 @@ then it will have ttyS1 as the controlling terminal (correct). Even though the controlling terminal is wrong, the login at ttyS1 works fine (since you gave ttyS1 as an argument to getty). The standard input and output are set to ttyS1 even though the controlling terminal -remains tty11. Other programs run at ttyS1 may inherit this standard +remains tty1. Other programs run at ttyS1 may inherit this standard input/output (which is connected to ttyS1) and everything is OK. But some programs may make the mistake of trying to read from their controlling terminal (tty1) which is wrong. Now tty1 may think that @@ -3662,7 +3780,9 @@ to communicate with you via the wrong terminal. Of course to escape from this you can go to another terminal and kill the process, etc. <sect2> agetty (may be named getty) <label id="agetty_"> -<p> An example line in /etc/inittab: <newline> +<p>agetty means "alternative getty" and it was an easier-to-use +alternative to the original getty (getty_ps).<newline> +An example line in /etc/inittab: <newline> <tscreen><verb> S1:23:respawn:/sbin/getty -L 19200 ttyS1 vt102 </verb></tscreen> @@ -3751,11 +3871,12 @@ will be garbled and parity will be set wrong. Thus it doesn't seem feasible to try to use 8-bit data bytes with parity. <sect2> getty (part of getty_ps) <label id="getty_ps"> -<p> (Most of this is from the old Serial-HOWTO by Greg Hankins)<newline> -For this getty one needs to both put entries in a configuration file -and add an entry in <tt>/etc/inittab</tt>. Here are some example -entries to use for your terminal that you put into the configuration -file <tt>/etc/gettydefs</tt>. +<p>The name has often been misspelled as <tt>ps_getty</tt>. (Most of +this is from the old Serial-HOWTO by Greg Hankins)<newline> For this +getty one needs to both put entries in a configuration file and add an +entry in <tt>/etc/inittab</tt>. Here are some example entries to use +for your terminal that you put into the configuration file +<tt>/etc/gettydefs</tt>. <tscreen><verb> # 38400 bps Dumb Terminal entry @@ -4501,7 +4622,9 @@ not to. Then hopefully this program might set the port so it doesn't need the control signal in the future in order to open: clocal or -crtscts. To use "minicom" to do this you likely will have to reconfigure minicom and then exit it and restart it. Instead of all -this bother, it may be simpler to just reboot the PC. +this bother, it may be simpler to just reboot the PC or via using a +virtual terminal kill the process using "top" (or "ps" to get the +process number and then "kill" to kill that process. The obsolete redirection method (which still works in later versions) is to type ``stty ... < /dev/ttyS2''. If the new method using -F @@ -4586,13 +4709,13 @@ name="Source-code database locations">. <sect1> Rarely Needed /etc/ttytype File <p> The configuration file /etc/ttytype is used to map /dev/ttySn's to -terminal names per terminfo. tset uses it, but if the TERM environment -variable is already set correctly, then this file is not needed. -Since the Linux getty sets TERM for each tty, you don't need this file. -In other Unix-like systems such as FreeBSD, the file /etc/ttys maps -ttys to much more, such as the appropriate getty command, and the -category of connection (such as "dialup"). An example line of -Linux ttytype: vt220 ttyS1 +terminal names per terminfo. tset/reset uses it, but if the TERM +environment variable is already set correctly, then this file is not +needed. Since the Linux getty sets TERM for each tty, you don't need +this file. In other Unix-like systems such as FreeBSD, the file +/etc/ttys maps ttys to much more, such as the appropriate getty +command, and the category of connection (such as "dialup"). An +example line of Linux ttytype: vt220 ttyS1 <sect1> Login Restrictions <label id="login_restr"> <p> By default, the root user may not login from a terminal. To @@ -4831,7 +4954,7 @@ would override it. Application programs don't seem to initialize To actually send an init string you must use a command given on the command line (or in a shell script such as /etc/profile). Such -commands are: "tset", "tput init", or "setterm -initialize". +commands are: "reset" "tset", "tput init", or "setterm -initialize". Sometimes there is no need to send an init string since the terminal may set itself up correctly when it is powered on (using options/preferences one has set up and saved in the non-volatile @@ -4852,7 +4975,7 @@ text terminals are also, the "linux" designation will sometimes work as a temporary expedient with a text terminal. If more than one type of terminal may be connected to the same port -(/dev/tty...) (for example, if there is a switch to permit different +(/dev/ttyS...) (for example, if there is a switch to permit different terminal types to use the same serial port, or if the port is connected to a modem to which people call in from different types of terminals) then TERM needs to be set each time someone connects to the @@ -4862,16 +4985,17 @@ the user to type in (or select) the type of terminal s/he is using. You may need to use tset for this or write a short shell script to handle this. -<label id="tset"> -One way to do this is to use "tset" (see the manual page). tset tries -to determine the terminal name of the terminal you are using. Then it -looks up the data in terminfo and sends your terminal an init string. -It can also set the value of TERM. For example, a user dials in and -logs in. The .profile login script is executed which contains within -it the following statement: eval `tset -s ?vt100`. This results in: -The user is asked if s/he is using a vt100. The user either responds -yes or types in the actual terminal type s/he is using. Then tset -sends the init string and sets TERM to this terminal name (type). +<label id="reset_"> +One way to do this is to use "reset" (same as "tset"; see the manual +page). reset tries to determine the terminal name of the terminal you +are using. Then it looks up the data in terminfo and sends your +terminal an init string. It can also set the value of TERM. For +example, a user dials in and logs in. The .profile login script is +executed which contains within it the following statement: eval `tset +-s ?vt100`. This results in: The user is asked if s/he is using a +vt100. The user either responds yes or types in the actual terminal +type s/he is using. Then "reset" sends the init string and sets TERM +to this terminal name (type). <sect1> Terminfo/Termcap Documents <label id="termcap_docs"> <p> <itemize> @@ -5123,13 +5247,13 @@ a remote computer may send binary to your screen. There are numerous other ways it can happen so be prepared for it. Even a supposedly text file could contain unwanted control codes. -To fix this problem reset the terminal. Type either just "reset" (may -be broken) or "setterm -reset" (followed by a <return> of -course). You may not be able to see what you're typing. This will +To fix this problem reset the terminal. Type either just "reset" or +"tset" or "setterm -reset" (followed by a <return> of course -- +what you type will likely not be readable on the screen). This will send the reset string from the terminfo entry to the terminal. As an alternative to this, if the correct set-up has been saved inside the terminal then pressing a special key(s) (perhaps in setup mode) may -restore the settings. Then you might still need to use "tset" to send +restore the settings. Then you might still need to use "reset" to send the init string if you use it to set up your terminal. <sect2> Reset command was broken but now fixed @@ -5399,8 +5523,9 @@ both people having their hands on the keyboard at the same time. There's one shortcoming to "ttysnoop" and that is that the terminals involved should all be (or emulate) the same type of terminal (such as vt100). Since the "Linux" emulation done by a console (monitor) and -the "minicom" emulation are close to vt100 one may use ttysnoop using -two PCs, one running "minicom" which emulates a terminal. +the "minicom" (or "picocom") emulation are close to vt100 one may use +ttysnoop using two PCs, one running "minicom" which emulates a +terminal. There's a non-free program called "DoubleVision" that is something like ttysnoop but does much more. Terminals may be of different types @@ -5417,7 +5542,7 @@ physical connection is easy using one of these methods: <item> Use an AB switch to switch between the terminal and other device (uses 3 cables) <item> Use the printer (or aux) port on the terminal for the other - device +device </itemize> When you are not using the serial port for a terminal, then you need @@ -5584,8 +5709,8 @@ serial_echo_outb(0x0c, UART_DLL); Change 0x0c in the line above (depending on the baud rate you want): 115200 baud: 0x01 19200 baud: 0x06 2400 baud: 0x30 - 57600 baud: 0x02 9600 baud: 0x0c 1200 baud: 0x60 - 38400 baud: 0x03 4800 baud: 0x18 +57600 baud: 0x02 9600 baud: 0x0c 1200 baud: 0x60 +38400 baud: 0x03 4800 baud: 0x18 </verb></tscreen> If you currently use the console to select which operating system to @@ -5700,23 +5825,23 @@ problem involves the serial port itself see the Serial-HOWTO. Here is a list of possible problems: <itemize> <item><ref id="term_OK" name="Is the Terminal OK ?"> - Suspect the terminal is defective. +Suspect the terminal is defective. <item><ref id="display_freezes" name="Display Freezes (hung - terminal)"> +terminal)"> <item><ref id="displays_foreign" name="Displays Foreign/Weird - Characters/Symbols"> +Characters/Symbols"> <item><ref id="displays_esc-seqs" name="Displays Escape Sequences"> <item><ref id="flow_ctrl_ng" name="Missing Text"> Either skips - over some text or displays some text OK and hangs. +over some text or displays some text OK and hangs. <item><ref id="keys_erratic" name="All Keys Work Erratically; Must Hit - a Key a Few Times"> +a Key a Few Times"> <item><ref id="stopped_" name="If getty run from command line: Programs - get stopped"> with message "Stopped" +get stopped"> with message "Stopped" <item><ref id="rapid_respawn" name="Getty Respawning Too Rapidly"> - (console error message) +(console error message) <item><ref id="after_login" name="Fails Just After Login"> <item><ref id="cant_login" name="Can't Login"> but login prompt is - OK. +OK. <item><ref id="garbled" name="Garbled Login Prompt"> <item><ref id="no_login_prompt" name="No Login Prompt"> </itemize> @@ -5846,7 +5971,7 @@ to your terminal, it's reasonable not to use lockfiles. See Lock-Files in the Serial-HOWTO. <sect1> ... respawning too fast: disabled for 5 minutes - <label id="rapid_respawn"> +<label id="rapid_respawn"> <sect2>What's happening <p>You see a message on the console like: "Getty respawning too fast: @@ -5858,7 +5983,7 @@ When getty starts up, it tries to send a login message to the serial port. But if there is something seriously wrong, getty will be immediately killed. Since the /etc/inittab file line for getty says to "respawn", getty is started again, only to be killed again, etc. -Thus getty respawns over and over. But the operating system +Thus getty rapidly respawns over and over. But the operating system intervenes and stops this nonsense (for 5 minutes). The following sections show possible causes and fixes. @@ -5871,7 +5996,7 @@ may cause this problem. <p> If the terminal doesn't send the PC a CD signal on one of the pins of the serial port, getty will be killed unless the "local" option has been used with getty. So a quick fix is to just use a "local" option -(-L for agetty, "CLOCAL" in /etc/gettydefs for ps_getty). +(-L for agetty, "CLOCAL" in /etc/gettydefs for getty_ps). Another approach is to determine why CD is not being asserted. In many cases the cable to the terminal simply doesn't have a wire for @@ -6136,7 +6261,7 @@ monitor it. Has info on errors and byte flow. the command line) </itemize> You may already have the above programs. If not, go to <url url= -"http://ibiblio.unc.edu/pub/Linux/system/serial/" name="Serial +"http://ibiblio.org/pub/Linux/system/serial/" name="Serial Software">. When using these, bear in mind that what you see is the state of the lines at the host computer. The situation at the terminal will be different since some wires are often missing from @@ -6303,12 +6428,12 @@ such names: <item> V-Pos adjusts the Vertical Position <item> H-Pos adjusts the Horizontal Position <item> V-Lin adjusts Vertical Linearity (Use if width of scan lines - differs at the top and bottom of the screen) + differs at the top and bottom of the screen) <item> V-Hold adjusts Vertical Hold (Use if screen is uncontrollable - scrolling) + scrolling) <item> Bright adjusts brightness (an external knob may also exist) <item> Sub-Bright adjusts brightness of subdued intensity mode (often - the normal mode: dimmer than bold or bright mode). +the normal mode: dimmer than bold or bright mode). </itemize> Changing linearity may change the size so that it will need to be @@ -6404,7 +6529,7 @@ have on-line data that search engines don't index. To see if the digital electronics work, try (using a good keyboard) typing at the bad terminal. Try to read this typing at a good terminal (or the console) using the copy command or with a -terminal communication program such as minicom. You may need to hit +terminal communication program such as picocom. You may need to hit the return key at the terminal in order to send a line. One may ask the bad terminal for its identity etc. from another terminal. This will show if two-way communication works. @@ -6693,7 +6818,8 @@ assembly. <p><itemize> <item> <ref id="setterm_" name="setterm">: long options <item> <ref id="tput" name="tput">: terse options -<item> tset: initializes only +<item> reset: initializes only +<item> tset: same as reset <item> clear: clears screen <item> setterm -reset: sends reset string </itemize> @@ -6707,19 +6833,19 @@ assembly. <sect2> Terminfo <p><itemize> <item> <ref id="tic" name="Terminfo Compiler (tic)"> terminfo compiler - & translator +& translator <item> toe: shows list of terminals for which you have terminfo - files +files <item> <ref id="infocmp" name="infocmp" > compares or displays terminfo - entries +entries </itemize> <sect2> Other <p><itemize> <item> gitkeys: shows what bytes each key sends to the host. <item> tty: shows what tty port you are connected to. -<item> set (or tset -q): shows the value of TERM, the terminfo entry name -<item> <ref id="tset" name="tset">: sets TERM interactively and initializes +<item> reset -q: shows the value of TERM, the terminfo entry name +<item> <ref id="reset_" name="reset">: sets TERM interactively and initializes </itemize> <sect1> The Internet and Books @@ -6727,46 +6853,46 @@ assembly. <sect2> Terminal Info on the Internet <label id="internet_"> <p> <itemize> <item> <url url="http://www.cs.utk.edu/~shuford/terminal_index.html" - name= "Shuford's Website"> at the University of Tennessee has a great - deal of useful information about text terminals. +name= "Shuford's Website"> at the University of Tennessee has a great +deal of useful information about text terminals. <item> VT terminal information and history <url url="http://www.vt100.net/"> <item> <url url="http://www.boundless.com/text%20terminals.htm" name="Boundless"> purchased the VT and Dorio terminal business from - DEC. Boundless used to have online Specs of their ADDS, VT, and - DORIO terminals but that link (in previous versions of this HOWTO) is - now dead. +DEC. Boundless used to have online Specs of their ADDS, VT, and +DORIO terminals but that link (in previous versions of this HOWTO) is +now dead. <item> Wyse has detailed info (such as escape sequences) in it's - knowledge base. It's not as complete as a real manual since it mainly - cover "native" personality. <url - url="http://www.wyse.com/service/support/kbase/wyseterm.asp" - name="Wyse text-terminals database"> For current models see <url - url="http://www.wyse.com/products/gpt/index.asp" name="Wyse terminals">. +knowledge base. It's not as complete as a real manual since it mainly +cover "native" personality. <url +url="http://www.wyse.com/service/support/kbase/wyseterm.asp" +name="Wyse text-terminals database"> For current models see <url +url="http://www.wyse.com/products/gpt/index.asp" name="Wyse terminals">. <item> <url url="http://dickey.his.com/ncurses/ncurses.faq.html" - name="ncurses FAQ"> <item> comp.terminals is the newsgroup for - terminals </itemize> +name="ncurses FAQ"> <item> comp.terminals is the newsgroup for +terminals </itemize> <sect2> Books related to terminals <p> <itemize> <item> EIA-232 serial port see <ref id="RS232_books" - name="EIA-232 (RS-232) Books">. +name="EIA-232 (RS-232) Books">. <item> Repair see <ref id="repair_info" name="Repair Books & - Websites">. +Websites">. <item> Terminfo database see <ref id="termcap_docs" - name="Termcap Documents"> +name="Termcap Documents"> </itemize> <sect2> Entire books on terminals <p> As far as I know, there is no satisfactory book on text terminals Although this HOWTO has been published as a book, I don't suggest that that you buy it if you have access to the online version which I'm -improving on every month or so. The following are mainly of +improving on every few months or so. The following are mainly of historical interest: <itemize> <item> Handbook of Interactive Computer Terminals by Duane E. Sharp; - Reston Publishing Co. 1977. (mostly obsolete) +Reston Publishing Co. 1977. (mostly obsolete) <item> Communicating with Display Terminals by Roger K. deBry; - McGraw-Hill 1985. (mostly on IBM synchronous terminals) +McGraw-Hill 1985. (mostly on IBM synchronous terminals) </itemize> The "HANDBOOK ... " presents brief specifications of over 100 different @@ -6797,12 +6923,12 @@ much of the information does not not apply to Linux. <itemize> <item> Unix Power Tools by Jerry Peck et. al. O'Reilly 1998. - Ch. 5 Setting Up Your Terminal, Ch. 41: Terminal and Serial Line - Settings, Ch. 42: Problems With Terminals +Ch. 5 Setting Up Your Terminal, Ch. 41: Terminal and Serial Line +Settings, Ch. 42: Problems With Terminals <item> Advanced Programming in the Unix Environment by W. Richard Stevens - Addison-Wesley, 1993. Ch. 11: Terminal I/O, Ch. 19: Pseudo Terminals +Addison-Wesley, 1993. Ch. 11: Terminal I/O, Ch. 19: Pseudo Terminals <item> Essential System Administration by Aleen Frisch, 2nd ed. - O'Reilly, 1998. Ch. 11: Terminals and Modems. +O'Reilly, 1998. Ch. 11: Terminals and Modems. </itemize> The "UNIX POWER TOOLS" book has 3 short chapters on text terminals. @@ -6845,14 +6971,15 @@ much use for text-terminals since it's not multiuser. For other unix-like OSs, the configuration of the host computer for terminals is usually significantly different than for Linux. Here are -some links to on-line manuals for unix-like systems. +some links to on-line manuals for non-linux systems. <itemize> -<item> SCO's OpenServer <url url= - "http://osr5doc.ca.caldera.com:457/HANDBOOK/CONTENTS.html" - name="Adding Serial Terminals"> in SCO OpenServer Handbook. -<item> Hewlett-Packard's HP-UX "Configuring Terminals and Modems" -(Url to it is dead.) +<item> <url url= +"http://docsrv.sco.com:507/en/HANDBOOK/serial_terminal_adding.html" +name="Adding Serial Terminals"> in SCO OpenServer Handbook. +<item> Hewlett-Packard's HP-UX <url + url="http://docs.hp.com/en/B2355-90675/ch03.html" name="Configuring + Terminals and Modems"> </itemize> <sect> Appendix B: Escape Sequence Commands Terminology <label @@ -7294,7 +7421,7 @@ for it. </itemize> <sect1> Serial Software -<p> See <url url="ftp://ibiblio.unc.edu/pub/Linux/system/serial/" +<p> See <url url="ftp://ibiblio.org/pub/Linux/system/serial/" name="Serial Software"> for Linux software for the serial ports including getty and port monitors. @@ -7416,10 +7543,8 @@ The "sco unix console" is claimed to be a powerful emulation using the <p> For detailed manual-like information on old terminals see <url url="http://www.wyse.com/service/support/kbase/wyseterm.asp">. This information includes specs, lists of escape sequences, part lists, -FAQs, setup info, etc. Thanks to Wyse for providing this. -For the specs on more recent terminals see See <url -url="http://www.wyse.com/products/gpt/index.asp" name="Wyse -terminals">. +FAQs, setup info, etc. Thanks to Wyse for providing this even though +as of 2006 they are no longer making text terminals. Wyse terminals were lower in cost than other brands and they captured a major share of the market. There were concerns about the quality of @@ -7526,7 +7651,7 @@ Later models were 185e. <sect2> Low Emissions: -ES <p>ES after the model number means low emissions: low magnetic field, -etc.. +etc. END OF Text-Terminal-HOWTO </article>