Jan 25, 1999 - Pieter Krul
v0.11
This document describes how to connect a DEC VT420 terminal to a Red
Hat 5.x Linux box,
and get it to work as fast as possible.
It is not intended for those who want to know everything about (serial)
terminals under Linux.
Please consult the Text-Terminal-HOWTO, and the Serial-HOWTO, if you
would like more
information about the setup and fine-tuning of terminals under Linux.
The setup below is tested only on an Intel based machine, with an Abit
LX6 mainboard,
which has DB9 serial ports where a DEC VT420 terminal was connected
to.
The terminal is NOT the PC keyboard version.
This setup could probably work on any Linux machine which has an RS-232C/D
interface.
REQUIREMENTS
CABLING
Since we're going to connect the terminal direct to the serial
port of the server, we will need a
null-modem (aka crossed-) cable with the following pinouts:
DB25-DB25 null modem cable:
GND 1 -------- 1 GND
TD 2 --- --- 2 TD
\/
/\
RD 3 --- --- 3 RD
RTS 4 --- --- 4 RTS
\/
/\
CTS 5 --- --- 5 CTS
DSR 6 --- --- 6 DSR
| |
| |
DCD 8 --- --- 8 DCD
\/
/\
DTR 20 --- --- 20 DTR
SG 7 -------- 7 SG
DB9-DB25 null modem cable:
RD 2 -------- 2 TD
TD 3 -------- 3 RD
RTS 7 --- --- 4 RTS
\/
/\
CTS 8 --- --- 5 CTS
SG 5 -------- 7 SG
DSR 6 --- --- 6 DSR
| |
| |
DCD 1 --- --- 8 DCD
\/
/\
DTR 4 --- --- 20 DTR
SYSTEM FILES
The following line should be present in /etc/gettydefs:
DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL # login: #DT9600
There should be an entry for the VT420 in /etc/termcap, but you might want to check on that.
Edit /etc/inittab, and append one of these "vt420" entries for the serial port you are going to use for the terminal:
S0:234:respawn:/sbin/getty ttyS0 DT9600 vt420
S1:234:respawn:/sbin/getty ttyS1 DT9600 vt420
S2:234:respawn:/sbin/getty ttyS2 DT9600 vt420
S3:234:respawn:/sbin/getty ttyS3 DT9600 vt420
If you're going to connect the terminal to eg ttyS0, you could check
this device by doing:
/bin/setserial /dev/ttyS0
On an Intel based machine this should produce something like
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
TERMINAL SETUP
Turn on the terminal and go into Set Up mode (F3)
You should now see the Set-Up Direcory
Under GLOBAL, change the settings to:
On Line
Sessions on Comm1
Comm1=RS-232
Under General:
VT400 Mode, 7 Bit Controls
VT420 ID
Under Comm:
Transmit=9600
Receive=transmit
No XOFF
8 Bits, No Parity
1 Stop Bit
No Local Echo
Data Leads Only
No Disconnect
unlimited Transmit
Auto Answerback
DOES IT WORK ?
Shut down both the server as the terminal, and connect them using the
null-modem cable.
Turn on the machines, and wait until the server has booted.
You should now see a login-prompt on aswell your server as your terminal.
You also could check /var/log/secure for something like: DIALUP AT ttyS0 BY
TROUBLESHOOTING
Q:
I don't see a login-prompt
A:
Besides the answers found in the Text-Terminal-HOWTO, you could try
to check your
serial port by doing a getty /dev/ttySx, where x is
the serial port you attached the
terminal to. It could happen that a login-prompt appears on your terminal,
and that the
shell on the server exits. In this case you should check the system-files
again for mistakes.
Q:
When I login, I get complaints about "Terminal type unknown"
A:
You could put the following in your /etc/profile:
TERMCAP="/etc/termcap"
export TERMCAP
if [ $TERM = linux ]; then
eval `dircolors`;
elif [ $TERM = xterm ]; then
eval `dircolors`;
elif [ $TERM = vt420 ]; then
ls () { command ls -F $* }
declare -xf ls
[ -z "$INV" ] && export INV=`tput rev`
# Inverted display
[ -z "$BRI" ] && export BRI=`tput bold` #
Bold display
[ -z "$NRM" ] && export NRM=`tput rmso` #
Restore normal mode
else
echo "Unknown terminal type $TERM. Please set type
manually"
fi
Note that the $INV, $BRI and $NRM variables are some that are made up
to be able to
use inverted or bright text, and to be able to restore this to normal.
I have placed a lot of these lines in a separate file, which I use
with for example shell-scripts.
See also tput(1)