mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
e3683984bc
commit
c1616141f2
|
@ -2,11 +2,12 @@
|
|||
<article>
|
||||
<title> Text-Terminal-HOWTO
|
||||
<author> David S. Lawyer <url url="mailto:dave@lafn.org">
|
||||
|
||||
<date> v1.18, December 2000
|
||||
<date> v1.19, January 2001
|
||||
|
||||
<!--
|
||||
Change log:
|
||||
v1.19 Jan. 2001 more on stuck on line 25, more on DEC MMJ cabling,
|
||||
dual signal ground wires, programs use terminfo w/o ncurses
|
||||
v1.18 Dec. 2000 mesg command, respawning error cause, chaos when 2
|
||||
processes open same terminal, rebooting
|
||||
v1.17 Dec. 2000 Don't run getty from the command line,
|
||||
|
@ -90,12 +91,10 @@ maintainer. You may create a derivative work and distribute it
|
|||
provided that you:
|
||||
|
||||
<enum>
|
||||
<item> Send your derivative work to the LDP (Linux Documentation
|
||||
Project) or the like for free distribution on the Internet in a
|
||||
format they will accept. If not the LDP, then let the LDP know
|
||||
where it is available. Except for a translation, send a copy to the
|
||||
previous maintainer's url as shown in the latest version.
|
||||
|
||||
<item> If it's not a translation: Email a copy of your derivative work
|
||||
to the LDP (Linux Documentation Project) for free distribution on the
|
||||
Internet in a format LDP accepts. Also email such a copy to the
|
||||
author(s) and maintainer (could be the same person).
|
||||
<item>License the derivative work in the spirit of this license or use
|
||||
GPL. Include a copyright notice and at least a pointer to the
|
||||
license used.
|
||||
|
@ -147,15 +146,16 @@ 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 will be available to
|
||||
browse and/or download at LDP mirror sites. For a list of mirror
|
||||
sites see: <url url="http://linuxdoc.org/mirrors.html">.
|
||||
Various formats are available. If you only want to quickly check the
|
||||
date of the latest version look at <url
|
||||
<p> New versions of the Text-Terminal-HOWTO should be released every
|
||||
month or two to browse and/or download at LDP mirror sites. For a
|
||||
list of mirror sites see: <url
|
||||
url="http://linuxdoc.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://linuxdoc.org/HOWTO/Text-Terminal-HOWTO.html">. The
|
||||
version your are currently reading is: v1.18, December 2000 . New in this version:
|
||||
v1.18: mesg command, respawning error cause, chaos when 2 processes
|
||||
open same terminal, rebooting.
|
||||
version your are currently reading is: v1.19, January 2001 . New in this version:
|
||||
v1.19 more on stuck on line 25, more on DEC MMJ cabling, dual signal
|
||||
ground wires, programs use terminfo w/o ncurses
|
||||
|
||||
<sect1> Related HOWTOs, etc. <label id="related_howtos">
|
||||
<p> Go to the websites shown above to get these.
|
||||
|
@ -725,22 +725,23 @@ 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 superceded by "terminfo".
|
||||
This database resides in certain files on the computer and has a
|
||||
section of it (sometimes an entire file) for each model of terminal.
|
||||
For each model (such as VT100) a list of capabilities is provided
|
||||
including a list of certain escape sequences available. For example
|
||||
blink=\E5m means that to make the cursor start blinking the terminal
|
||||
must be sent: Escape 5 m. See Section <ref id="termcap2"
|
||||
name="Termcap and Terminfo (detailed)" > for more details.
|
||||
Application programs may utilize this database by calling certain
|
||||
C-Library functions. One large set of such programs (over 200) is
|
||||
named "ncurses" and are listed in the manual page for "ncurses".
|
||||
To overcome these problems a database called "termcap" (meaning
|
||||
"terminal capabilities") was established. Termcap was later
|
||||
superceded by "terminfo". This database resides in certain files on
|
||||
the computer and has a section of it (sometimes a separate file) for
|
||||
each model of terminal. For each model (such as VT100) a list of
|
||||
capabilities is provided including a list of certain escape sequences
|
||||
available. For example blink=\E5m means that to make the cursor start
|
||||
blinking the terminal must be sent: Escape 5 m. See Section <ref
|
||||
id="termcap2" name="Termcap and Terminfo (detailed)" > for more
|
||||
details. Application programs may utilize this database by calling
|
||||
certain C-Library functions. One large set of such programs (over
|
||||
200) is named "ncurses" and are listed in the manual page for
|
||||
"ncurses".
|
||||
|
||||
<sect1> The Interface
|
||||
<p> The environment variable TERM is the type of terminal Linux thinks
|
||||
you are using. Some application programs use this to look up the
|
||||
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.
|
||||
|
@ -768,16 +769,28 @@ to emulate a VT100. Wyse is a major terminal manufacturer and most of
|
|||
their terminals can emulate various DEC terminals such at VT100 and
|
||||
VT220. Thus if you want to, say, use a VT320 terminal you may either
|
||||
use a real VT320 in "native" personality or possibly use some other
|
||||
terminal capable of emulating a VT320. The "native" personalities
|
||||
usually have more capabilities so, other things being equal, "native"
|
||||
is usually the best to use.
|
||||
terminal capable of emulating a VT320.
|
||||
|
||||
The "native" personalities usually have more capabilities so, other
|
||||
things being equal, "native" is usually the best to use. But other
|
||||
things may not be equal. Since the Linux console emulates a VT102 it
|
||||
you may want to have a terminal emulate this (or something close to it
|
||||
such as VT100). This will help insure that some programs that may not
|
||||
handle terminals properly will still work OK on your terminal. Some
|
||||
programs will assume that you are using a VT012 if the program can't
|
||||
find a terminfo for your terminal (or can't find a certain
|
||||
capability). Thus the failure of a program to work correctly with
|
||||
your non-vt102 terminal may well be your fault if you don't provide a
|
||||
good terminfo file for your terminal. Using "native" and then
|
||||
reporting any bugs will help discover and fix bugs which might not
|
||||
otherwise get detected.
|
||||
|
||||
The most common type of emulation is to use a PC like it was a vt100
|
||||
terminal (or the like). Programs loaded into the PC's memory permits
|
||||
this. In Linux (unless you're in X-windows) the PC monitor (called
|
||||
the console) emulates a terminal of type "Linux" (close to vt100).
|
||||
Even certain windows within X-windows emulate terminals. See <ref
|
||||
id="term_emulation" name="Terminal Emulation">.
|
||||
terminal (or the like). Programs loaded into the PC's memory do the
|
||||
emulation. In Linux (unless you're in X-windows) the PC monitor
|
||||
(called the console) emulates a terminal of type "Linux" (close to
|
||||
vt100). Even certain windows within X-windows emulate terminals. See
|
||||
<ref id="term_emulation" name="Terminal Emulation">.
|
||||
|
||||
<sect1> The Console
|
||||
|
||||
|
@ -1778,7 +1791,7 @@ TxD Transmit Data 3 --> 3 RxD Receive Data
|
|||
6 DSR Data Set Ready
|
||||
|
|
||||
DTR Data Terminal Ready 4 --> 8 DCD Carrier Detect
|
||||
GND Signal Ground 5 --- 7 GND Signal Ground
|
||||
SG Signal Ground 5 --- 7 SG Signal Ground
|
||||
DCD Carrier Detect 1
|
||||
|
|
||||
DSR Data Set Ready 6 <-- 20 DTR Data Terminal Ready
|
||||
|
@ -1823,7 +1836,7 @@ of the connector, connect RTS and CTS together, and also connect DSR,
|
|||
DCD and DTR together. This way, when the computer needs a certain
|
||||
handshaking signal to proceed, it will get it (falsely) from itself.
|
||||
|
||||
<sect2> Length Limitations
|
||||
<sect2> Overcoming Length Limitations <label id="length_">
|
||||
<p> A cable longer than a 50 feet or so may not work properly at high
|
||||
speed. Much longer lengths sometimes work OK, especially if the speed
|
||||
is low and/or the cable is a special low-capacitance type and/or the
|
||||
|
@ -1833,6 +1846,28 @@ to cover long distances is to install 2@ line drivers near each serial
|
|||
port so as to convert unbalanced to balanced (and conversely) and then
|
||||
use twisted pair cabling. But line drivers are expensive.
|
||||
|
||||
Another way to increase the distance is to try to cancel out much of
|
||||
the magnetic field created by the currents in the transmit and receive
|
||||
data wires: TxD and RxD. To do this, ground return lines, which have
|
||||
current which is roughly equal (but in the opposite direction) are
|
||||
placed next to the the transmit and received wires. Twisted pair has
|
||||
the best cancellation. Some DEC terminals have two signal ground
|
||||
wires for this purpose. For example, one pair would be TxD and
|
||||
SG(TxD) where SG is signal ground. If you use ribbon cable, insure
|
||||
that the TxD and SG(TxD) wires are right next to each other.
|
||||
Similarly for the RxD.
|
||||
|
||||
If there is only one signal ground wire provided by both the PC and
|
||||
the terminal, it may be split into two wires in a twisted pair cable
|
||||
for this purpose. You might think that return currents will be
|
||||
equally split between the two signal ground wires. This would cancel
|
||||
out only about half of the magnetic field. But it's better
|
||||
cancellation than this because return current prefers the path of
|
||||
least impedance. The return path of a data signal (such as TxD) has
|
||||
the lowest impedance (due to lower inductance) if it flows back in the
|
||||
same twisted pair. Although I've haven't seen any experimental test
|
||||
results for this method, it should allow longer cable lengths.
|
||||
|
||||
<sect2> Hardware Flow Control Cables
|
||||
<p> If you expect to use hardware flow control (handshaking) you will
|
||||
likely need to make up your own cable (or order one made). Of course,
|
||||
|
@ -1858,7 +1893,8 @@ computer cable is best.
|
|||
|
||||
<sect2> A Kludge using Twisted-Pair Cable <label
|
||||
id="twist_pair_kludge">
|
||||
<p> Although none of the EIA-232 signals are balanced for twisted pair
|
||||
<p> See also <ref id="length_" name="Overcoming Length Limitations">.
|
||||
Although none of the EIA-232 signals are balanced for twisted pair
|
||||
one may attempt to use twisted-pair cable with it. Use one pair for
|
||||
transmit and another for receive. To do this connect signal ground to
|
||||
one wire in each of these 2 pair. Only part of the signal ground
|
||||
|
@ -2021,20 +2057,33 @@ magnifying glass.
|
|||
<p> These look like modern telephone connectors but are sometimes not
|
||||
compatible with telephone connectors. See also <ref
|
||||
id="rj_conn_install" name="Installing RJ Connectors">. They may be 6,
|
||||
8, or 10 conductor. RJ11/14 is a 4-6 conductor telephone plug. A
|
||||
look-alike is a MMJ connector (6-conductor) used on later model VT
|
||||
(and other) terminals. MMJ has an offset tab and is not compatible
|
||||
with RJ11/14. However, some connectors have been made that are
|
||||
compatible with both MMJ or RJ11/14. The MMJ pin-out is: 1-DTR,
|
||||
2-TXD, 3-TXD GND, 4-RXD GND, 5-RXD, 6-DSR.
|
||||
8, or 10 conductor.
|
||||
|
||||
A null-modem cable with MMJ (or RJ11/14) connectors will connect: 1-6,
|
||||
2-5, and 3-4. Note that such a cable support DTR/DSR flow control
|
||||
which is not supported (yet) by Linux. Making up your own 6-conductor
|
||||
null-modem cable is very simple if you understand that the ordinary
|
||||
4-conductor telephone cable from the wall to your telephone, used in
|
||||
hundreds of millions of homes, is also a null-modem cable. Find one
|
||||
and wire your cable the same way.
|
||||
<sect3> 6-conductors (including MMJ look-alikes)
|
||||
<p> RJ11/14 is a 4-6 conductor telephone plug. A look-alike is a MMJ
|
||||
connector (6-conductor) used on later model VT (and other) terminals.
|
||||
It's sometimes referred to as a DEC-423. MMJ has an offset tab and is
|
||||
not compatible with RJ11/14 (unless the tab is cut off). However,
|
||||
some connectors have been made that are compatible with both MMJ or
|
||||
RJ11/14. Since MMJ connectors are both hard to find and expensive
|
||||
some people have forced a RJ11/14 (6 conductor) to fit MMJ by filing
|
||||
off a tab with a file. The MMJ pin-out is: 1-DTR, 2-TXD, 3-TXD GND,
|
||||
4-RXD GND, 5-RXD, 6-DSR.
|
||||
|
||||
A standard MMJ null-modem cable has a MMJ connector at each end. It
|
||||
connects to the PC using a MMJ-to-DB adapter. This adapter plugs into
|
||||
a DB (say 25 pin) connector on the back of the PC and the MMJ
|
||||
connecter plugs into it. If you don't have such an adapter, you can
|
||||
make a custom cable with a MMJ (or filed RJ) connector on one end and
|
||||
a DB connector on the other end.
|
||||
|
||||
The standard null-modem cable with two MMJ (or RJ11/14) connectors
|
||||
will connect: 1-6, 2-5, and 3-4. Note that such a cable supports
|
||||
DTR/DSR flow control which is not supported (yet) by Linux. Making up
|
||||
your own standard 6-conductor null-modem cable is very simple if you
|
||||
understand that the ordinary 4-conductor telephone cable from the wall
|
||||
to your telephone, used in hundreds of millions of homes, is also a
|
||||
null-modem cable. Find one and wire your cable the same way.
|
||||
|
||||
If you lay such a cable (or your terminal null-modem cable) flat on
|
||||
the floor (with no twists) you will note that both plugs on the ends
|
||||
|
@ -2045,7 +2094,25 @@ everything works OK because each inline coupler is also a null-modem
|
|||
adapter. Two null-modem devices in series result in a straight-thru
|
||||
connection.
|
||||
|
||||
RJ45 and RJ48 are usually 8-conductor modular telephone plugs.
|
||||
Here's a custom cable diagram (by Mark Gleaves) for connecting MMJ to
|
||||
a 9-pin serial port using RTS/CTS flow control:
|
||||
<tscreen><verb>
|
||||
DEC MMJ Linux PC DB9
|
||||
Pin Signal Signal Pin
|
||||
=== ====== ====== ===
|
||||
1 DTR -----------------------|---> DSR 6
|
||||
|---> CTS 8
|
||||
2 TxD ---------------------------> RxD 2
|
||||
3 SG (TxD)--------------------|--- SG 5
|
||||
4 SG (RxD)--------------------|
|
||||
5 RxD <--------------------------- TxD 3
|
||||
6 DSR <--------------------------- RTS 7
|
||||
|--- DTR 4
|
||||
|--> CD 1
|
||||
RI 9
|
||||
</verb></tscreen>
|
||||
<sect3> 8-conductors and 10-conductors
|
||||
<p> RJ45 and RJ48 are usually 8-conductor modular telephone plugs.
|
||||
However some are 10-conductor and are allegedly wider and will not
|
||||
mate with 8-conductor ones. They are used for both flat telephone
|
||||
cable and round twisted pair cable. The cable end of the connector
|
||||
|
@ -2606,10 +2673,10 @@ boundaries of an actual character may be smaller.
|
|||
be up to 80 characters in a row (line) on the screen. Many terminals
|
||||
have a 132 column option but unless you have a large screen, the tiny
|
||||
characters may be hard to read. {{Set 132 column mode}}. If you set
|
||||
25 lines, make sure that this is in the terminfo. You should also
|
||||
put "export LINES=25" into /etc/profile. If you don't it might result
|
||||
in a scrolling problem (see <ref id="no_scroll_25" name="Terminal
|
||||
doesn't scroll">
|
||||
25 lines, make sure that this is in the terminfo. You should also put
|
||||
"export LINES=25" into /etc/profile and also use: "stty -F /dev/ttySx
|
||||
rows 25". If you don't it might result in a scrolling problem (see
|
||||
<ref id="no_scroll_25" name="Terminal doesn't scroll">
|
||||
|
||||
<sect2> Cursor
|
||||
<p> The cursor may be set to appear as a rectangle (= block) {Blk}.
|
||||
|
@ -3875,13 +3942,16 @@ part of the screen, scroll the screen, change modes, change appearance
|
|||
After about 1980, many terminals supported over a hundred different
|
||||
commands (some of which take numeric parameters).
|
||||
|
||||
The normal way in which terminfo gives the its information to an
|
||||
application program is via the "ncurses" functions that a programmer
|
||||
may put into a C program. For example if a program wants to move the
|
||||
cursor to row 3, col 6 it simply calls: move(3,6). The move()
|
||||
function (part of ncurses) knows how to do this for your terminal
|
||||
(it can read terminfo). So it sends the appropriate escape sequence to
|
||||
the terminal to make this particular move for a certain terminal.
|
||||
One way in which terminfo gives the its information to an application
|
||||
program is via the "ncurses" functions that a programmer may put into
|
||||
a C program. For example, if a program wants to move the cursor to row
|
||||
3, col 6 it simply calls: move(3,6). The move() function (part of
|
||||
ncurses) knows how to do this for your terminal (it has read
|
||||
terminfo). So it sends the appropriate escape sequence to the
|
||||
terminal to make this particular move for a certain terminal.
|
||||
Some programs get info directly from a terminfo files without using
|
||||
ncurses. Thus a Linux package that doesn't require ncurses may still
|
||||
need a terminfo file for your terminal.
|
||||
|
||||
The terminfo abbreviations are usually longer than those of termcap
|
||||
and thus it's easier to guess what they mean. The manual pages for
|
||||
|
@ -3902,14 +3972,14 @@ you're now using (including a PC monitor) type "infocmp" and you
|
|||
should see the source terminfo "file" for it.
|
||||
|
||||
To see if your terminal (say vt100) is in the terminfo data base type
|
||||
"locate vt100". If you don't know what your terminal name is, explore
|
||||
the listing of files in the compiled database or see <ref
|
||||
id="term_name" name="What is the terminfo name of my terminal ?">
|
||||
"locate vt100". If you need to find the terminfo name for your
|
||||
terminal, explore the listing of files in the compiled database or see
|
||||
<ref id="term_name" name="What is the terminfo name of my terminal ?">
|
||||
|
||||
<sect2> Where is the database located ?
|
||||
<sect3> Compiled database locations <label id="tc_compiled_locs">
|
||||
<p> Typing "locate vt100" may show /usr/lib/terminfo/v/vt100,
|
||||
/usr/share/terminfo/v/vt100, /home/you/.terminfo/v/vt100, and/or
|
||||
/usr/share/terminfo/v/vt100, /home/.../.terminfo/v/vt100, and/or
|
||||
/etc/terminfo/v/vt100. All these are possible locations of the
|
||||
compiled terminfo files. Although the /etc/terminfo directory is not
|
||||
a standard location for it, having a few terminal types there could be
|
||||
|
@ -3920,18 +3990,29 @@ find it if it's in at least one of the locations mentioned above.
|
|||
Otherwise the environment variable TERMINFO may be set to the path to
|
||||
this database. Example: TERMINFO=/usr/share/terminfo
|
||||
|
||||
For the Debian Distribution of Linux, several commonly used terminals
|
||||
(including the monitor-console) are in the ncurses-term package.
|
||||
These are put into /etc/terminfo/. All of the terminals in the
|
||||
database are in the ncurses-bin package and go into
|
||||
/usr/share/terminfo/.
|
||||
|
||||
If the compiled terminfo is in more than one location, everything is
|
||||
usually OK until someone gets a new terminfo file(s) (from a newer
|
||||
distribution, from the net, by editing the old one, etc.). The newer
|
||||
terminfo needs to be put in all the existing locations (or redundant
|
||||
locations need to be abolished). If you don't ensure this gets done,
|
||||
then some application programs could wind up still finding and using the
|
||||
old (and buggy) terminfo data that sill exists in a "usual" location.
|
||||
Setting the environment variable TERMINFO to the up-to-date location
|
||||
(as mentioned above) may help avoid this problem.
|
||||
usually OK until someone installs new terminfo files (from a newer
|
||||
distribution, from the net, by editing the old one, etc.). Each new
|
||||
terminfo file needs replace all the existing older copies of that file
|
||||
(at various locations) unless you abolish redundant locations. If you
|
||||
don't ensure this gets done, then some application programs could wind
|
||||
up still finding and using the old (and possibly buggy) terminfo data
|
||||
that sill exists in a "possible" location. Setting the environment
|
||||
variable TERMINFO to the up-to-date location (as mentioned above)
|
||||
would help avoid this problem.
|
||||
|
||||
<sect3> Source-code database locations <label id="tc_source_loc">
|
||||
<p> The source code you use may reside in /etc/termcap and/or in
|
||||
<p> While the source-code file may not be installed on your computer
|
||||
there's another way to get the source-code if you have the compiled
|
||||
code. Just use the "<tt/infocmp/" command.
|
||||
|
||||
The source code file (for all terminals0 may be /etc/termcap and/or
|
||||
terminfo.src (or another name). See the man pages: terminfo(5) or
|
||||
termcap(5) for the format required to create (or modify) these source
|
||||
files. The file terminfo.src may be in various locations on your
|
||||
|
@ -3949,7 +4030,8 @@ Linux probably installed the compiled files on your hard disk so you
|
|||
don't need to compile anything unless you modify /etc/termcap (or
|
||||
terminfo.src ). "tic" will automatically install the resulting
|
||||
compiled files into a terminfo directory ready to be used by
|
||||
application programs.
|
||||
application programs. Which location it's installed in depends on ...
|
||||
See "man tic" for the explanation.
|
||||
|
||||
<sect2> Look at Your Terminfo <label id="infocmp">
|
||||
<p> It's a good idea to take a look at the terminfo entry for the
|
||||
|
@ -3988,7 +4070,7 @@ graphics character set. These often need more definitions to be added
|
|||
to the old termcap. This may (or may not) have already been done.
|
||||
|
||||
Most terminals had hardware bugs (in their firmware) and sometimes
|
||||
they were "fixed" by modifying the termcap. Then the manufacturer
|
||||
these were "fixed" by modifying the termcap. Then the manufacturer
|
||||
might send out replacement chips which would fix the bug. Not all
|
||||
owners would bother to get the replacement chips. Thus there may be 2
|
||||
or more terminfos for your terminal, depending on what firmware chips
|
||||
|
@ -4010,8 +4092,8 @@ compiled terminfo file in the correct directory reserved for it.
|
|||
|
||||
If you would like to find a better terminfo entry for a certain terminal
|
||||
than the one supplied, you might try searching the Internet (but what
|
||||
you find may be worse). If your new terminfo entry is better than the
|
||||
old one and it seems stable (you've used it for a while with no
|
||||
you find could be worse). If your new terminfo entry is better than
|
||||
the old one and it seems stable (you've used it for a while with no
|
||||
problems) then you should send a copy to the maintainer of terminfo as
|
||||
noted at the start of the source file for terminfo (or termcap).
|
||||
|
||||
|
@ -4023,14 +4105,15 @@ in, and/or make the terminal emulate another terminal. An
|
|||
initialization string is not automatically sent to the terminal to
|
||||
initialize it. One might expect that the getty program should do this
|
||||
but if it did, one could make a change to the set-up at the terminal
|
||||
and this change wouldn't be implemented because the init string would
|
||||
automatically cancel it. You must use a command given on the command
|
||||
line (or in a shell script) to send the init string such. Such
|
||||
commands are: "tset", "tput init", or "setterm -initialize".
|
||||
Sometimes there is no need to send the 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 non-volatile memory of
|
||||
the terminal).
|
||||
and this change wouldn't be happen because the init string would
|
||||
automatically cancel it. Application programs don't seem to
|
||||
initialize either. To do this you must use a command given on the
|
||||
command line (or in a shell script such as /etc/profile) to send the
|
||||
init strings. Such commands are: "tset", "tput init", or "setterm
|
||||
-initialize". Sometimes there is no need to send the init strings
|
||||
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 memory of the terminal).
|
||||
|
||||
<sect1> TERM Variable <label id="term_var">
|
||||
<p> The Environment variable TERM should be set to the name of
|
||||
|
@ -4683,7 +4766,7 @@ a Key a Few Times">
|
|||
<item><ref id="cant_login" name="Can't Login"> but login prompt is
|
||||
OK.
|
||||
<item><ref id="garbled" name="Garbled Login Prompt">
|
||||
<item><ref id="blank_" name="No Login Prompt">
|
||||
<item><ref id="no_login_prompt" name="No Login Prompt">
|
||||
</itemize>
|
||||
|
||||
There are two cases where the terminal goes bad. One is when it's
|
||||
|
@ -4891,26 +4974,31 @@ If you are using agetty (often just named getty), the agetty program
|
|||
will detect and set parity and/or bits/character if you type something.
|
||||
Try it with a return to see if it fixes it.
|
||||
|
||||
<sect1> No Login Prompt <label id="blank_">
|
||||
<p> This is when nothing at all happens at the terminal, but the
|
||||
terminal seems to be working OK. One of the first things to do is to
|
||||
make sure that all cable connections are tight and connected
|
||||
to the correct connector on both the computer and terminal. Other
|
||||
causes include defective hardware or cables (must be null-modem),
|
||||
getty not running, terminal setup at wrong baud-rate, terminal in
|
||||
local mode, etc.
|
||||
<sect1> No Login Prompt <label id="no_login_prompt">
|
||||
<p> If there's no login prompt displayed after hitting the return-key
|
||||
a few times, first make sure that the terminal is powered on. Is the
|
||||
computer it's connected to up and running? Use the "top" or "ps"
|
||||
programs to make sure that a getty (or login) process is running on
|
||||
the terminal. If getty isn't running, carefully check the format for
|
||||
calling getty in /etc/inittab. Make sure that it includes the current
|
||||
runlevel (shown by typing the command "runlevel") and that it is valid
|
||||
for your flavor of getty. Sometimes killing getty (it will restart
|
||||
automatically) helps.
|
||||
|
||||
At the console (or another working terminal), use "top" or "ps -al" to
|
||||
see if getty is running on the port. Don't confuse it with getty
|
||||
programs running on other ports or on the virtual consoles. You will
|
||||
not get a login prompt unless getty runs. If getty isn't running,
|
||||
carefully check the format for calling getty in /etc/inittab. Make
|
||||
sure that it includes the current runlevel (shown by typing the
|
||||
command "runlevel") and that it is valid for your flavor of getty.
|
||||
Sometimes killing getty (it will restart automatically) helps.
|
||||
|
||||
At this point two different avenues of approach are (you may pursue
|
||||
more than one at a time).
|
||||
<sect2> Terminal was working OK
|
||||
<p> Although hardware failures are possible, the problem is likely due
|
||||
to something that someone did by mistake. Did someone do something
|
||||
that might have loosened a cable? Did someone modify /etc/inittab or
|
||||
make some other change to the software so as to prevent terminal
|
||||
login? If this doesn't reveal the cause, continue reading.
|
||||
|
||||
<sect2> More diagnose
|
||||
<p> The above should solve most cases (unless you've just installed a
|
||||
terminal). Other causes include defective hardware or cables (must be
|
||||
null-modem), terminal setup at wrong baud-rate, terminal in local
|
||||
mode, etc. At this point two different avenues of approach are (you
|
||||
may pursue more than one at a time).
|
||||
|
||||
<itemize>
|
||||
<item> <ref id="consoleD" name="Diagnose Problem from the Console">
|
||||
|
@ -4944,37 +5032,36 @@ at the computer, then its serial port is dead. Test it with a
|
|||
software diagnostic test or replace it.
|
||||
|
||||
If the serial port is alive, you may want to send a file to it (with
|
||||
modem controls disabled) and see if anything gets to it. To check for
|
||||
a transmitted signal with a voltmeter, check for a steady negative
|
||||
voltage when the line is idle. Then start sending a file (or start
|
||||
getty). On an analog meter you should see the needle dropping to
|
||||
almost 0 and fluttering about 0 as it measures short-run averages of
|
||||
the bit stream. On a digital meter you will not see the fluctuations
|
||||
as well but you can switch to the AC scale to see the AC voltage
|
||||
created by the flow of bits. If your meter fails to block out DC on
|
||||
the AC scale (the default of most analog meters), then you could get a
|
||||
false high AC reading when looking at the idle DC of -12 V on the AC
|
||||
scale. Without a meter, you could connect a known good device (such
|
||||
as another terminal or an external modem) to the serial port and see
|
||||
if it works OK.
|
||||
modem controls disabled) and watch the signal on a voltmeter (or other
|
||||
electronic gadget). To check for a transmitted signal with a voltmeter,
|
||||
check for a steady negative voltage when the line is idle. Then start
|
||||
sending a file (or start getty). On an analog meter you should see
|
||||
the needle dropping to almost 0 and fluttering about 0 as it measures
|
||||
short-run averages of the bit stream. On a digital meter you will not
|
||||
see the fluctuations as well but you can switch to the AC scale to see
|
||||
the AC voltage created by the flow of bits. If your meter fails to
|
||||
block out DC on the AC scale (the default of most analog meters), then
|
||||
you could get a false high AC reading when looking at the idle DC of
|
||||
-12 V on the AC scale. Without a meter, you could connect a known
|
||||
good device (such as another terminal or an external modem) to the
|
||||
serial port and see if it works OK.
|
||||
|
||||
<sect1> Slow: pauses of several seconds between bursts of characters
|
||||
<p> You likely have mis-set interrupts> See the Serial-HOWTO section
|
||||
starting with "Slow:"
|
||||
|
||||
<sect1> Terminal doesn't scroll <label id="no_scroll_25">
|
||||
<p> One reason is that something is wrong with terminfo. Another
|
||||
<p> One reason may be that something is wrong with terminfo. Another
|
||||
reason could be that you are outside the scrolling region set for the
|
||||
terminal. Some programs just assume that your terminal has 24 lines
|
||||
and set the scrolling region for 24 lines (by an escape sequence sent
|
||||
to the terminal) without consulting terminfo to see how many lines
|
||||
there actually are. Then when you use another program it may leave
|
||||
the cursor on line 25 where it becomes trapped and the terminal will
|
||||
not scroll. To avoid this problem, create an environment variable
|
||||
"export LINES=25" and then the programs that assume 24 lines will
|
||||
hopefully use 25 lines set the scrolling region accordingly. An
|
||||
alternate way to fix this problem is to use the command "stty rows
|
||||
25".
|
||||
terminal. Some stupid programs just assume that your terminal has 24
|
||||
lines and set the scrolling region for 24 lines (by an escape sequence
|
||||
sent to the terminal) without consulting terminfo to see how many
|
||||
lines there actually are. Then when you use another program it may
|
||||
leave the cursor on line 25 where it becomes trapped and the terminal
|
||||
will not scroll. To avoid this problem, create an environment
|
||||
variable "export LINES=25" and also "stty -F /dev/ttySx rows 25".
|
||||
Then the programs that assume 24 lines will hopefully use 25 lines set
|
||||
the scrolling region accordingly.
|
||||
|
||||
<sect1> Serial Monitoring/Diagnostics <label id="serial_mon">
|
||||
<p> A few Linux programs will monitor the modem control lines and
|
||||
|
@ -5494,6 +5581,8 @@ url="http://www.wyse.com/service/support/kbase/wyseterm.asp"
|
|||
name="Teemworld Escape Sequences"> is a list of escape sequences (and
|
||||
control codes) for some terminal emulations (including VT 100, 300,
|
||||
420, and Wyse).
|
||||
<item> <url url="http://dickey.his.com/ncurses/ncurses.faq.html"
|
||||
name="ncurses FAQ">
|
||||
<item> comp.terminals is the newsgroup for terminals
|
||||
</itemize>
|
||||
|
||||
|
@ -5508,9 +5597,12 @@ url="http://www.wyse.com/service/support/kbase/wyseterm.asp"
|
|||
</itemize>
|
||||
|
||||
<sect2> Entire Books on Terminals
|
||||
<p> As far as I know, there is no satisfactory book on text
|
||||
terminals (unless you are interested in antique terminals of the
|
||||
1970's).
|
||||
<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
|
||||
historical interest:
|
||||
|
||||
<itemize>
|
||||
<item> Handbook of Interactive Computer Terminals by Duane E. Sharp;
|
||||
Reston Publishing Co. 1977. (mostly obsolete)
|
||||
|
@ -6189,4 +6281,3 @@ the set-up (confusing menu design).
|
|||
|
||||
END OF Text-Terminal-HOWTO
|
||||
</article>
|
||||
|
||||
|
|
Loading…
Reference in New Issue