|
[dvtm] [higher resolution] [Linux configuration] [terminal configuration] [UTF-8]
The WYSE 160 is a serial terminal that's capable of emulating
several text terminals as well as some graphical modes. Making it
work with Linux is quite simple. Add this line to your
/etc/inittab:
T1:23:respawn:/sbin/getty -L ttyS1 19200 vt102
This starts a getty listening on the second serial
port. The terminal type is set to vt102. Line speed is
19200 bits per second.
To make the terminal work with Linux, German keyboard layout and
Umlauts, set the following parameters in the setup menu of the
terminal (to enter the setup menu, press Select or
Setup, the key in the upper right corner on your terminal
keyboard):
- F2: Genrl
- Personality:
- VT220-7
- Enhance:
- On
- Rcvd CR:
- CR
- Recognize DEL:
- Off
- Monitor:
- Off
- F3: Keybd
- Keycode:
- ASCII
- Return:
- CR
- Keyboard:
- German
- F4: Comm
- Comm Mode:
- Full Duplex
- F5: Ports
- Ser1 Baud Rate:
- 19200
- Ser1 Data/Parity:
- 8/None
- Ser1 Stop Bits:
- 1
- S1 Rcv HSK:
- XON-OFF/XPC
- F7: ANSI1
- National Mode:
- Off
- Cursor Keys:
- Normal
- Keys:
- Typewriter
- F8: ANSI2
- ANSI ID:
- VT102
That's all. With exception of the Del-key (which acts
like Backspace) everything should work as expected. Enjoy
your terminal.
Thanks go out to Jan Kandziora for
providing the terminal and helping to set it up (along with some other
things).
bag of tricks
So far the terminal works, but there's even more possible, for
example using a higher resolution. We will add a new terminal
definition vt102-wl (wl for wide and
large). (Debian users can just install ncurses-term-mitch
from my Debian repository and skip the next paragraph.)
Use the command infocmp vt102 to print the current
terminal definition. Put this output into a file and edit it: Change
cols# and lines# from 80/24 to 132/43. Also change
(we don't want to break something) the name of the terminal definition
from vt102|dec vt102 to vt102-wl. Use tic
filename to add the new definition to your system.
As the next step, change the getty(8) entry in
/etc/inittab to use vt102-wl instead of
vt102.
Now only the terminal needs to know about the new resolution.
Enter the setup and change this:
- F1: Disp
- Columns:
- 132
- Data lines:
- 43
That's it! This way the terminal really is ready for work. If
programs like elinks(1) don't use the full available screen
with, you should try to start them from within a screen(1)
session (screen generally is a good idea).
After I changed the locale of my system to UTF-8, I added this
piece of code to my ~/.bashrc:
if [ "$TERM" = vt102-wl ]; then
export LANG=de_DE
export EDITOR=ee
export VISUAL=ee
fi
This is used to select a text editor and language settings that are
compatible with the terminal. When using this, screen(1) can
play it's strengths: I can start irssi(1) in my main system
within an UTF-8 locale under screen. I can then reattach the session
on my terminal using screen -rd. screen then automatically
handles all umlaut conversions - of course the terminal can't display
any Japanese characters, but I can read and write German umlauts
without any problems (note: irssi still runs with the UTF-8
locale!).
Another useful piece of software to use on the serial terminal (of
course it's useful on normal TTYs, too) is dvtm. It
basically is a dwm style
window manager for the console. Like screen(1)'s split mode,
but on drugs. Give it a try! Some programs that have problems
running directly on the terminal (eg. joe/jmacs, that's why I
use EDITOR=ee in the example above) work flawlessly when
running under dvtm.
To run dvtm automatically on a console login (and only
there), I've added this detection routine to the end (that's
important!) of my ~/.bashrc:
# start dvtm when on terminal
if [ "$TERM" = vt102-wl ]; then
export LANG=de_DE
export EDITOR=jmacs
export VISUAL=jmacs
DVTM=/home/mitch/remote-git/dvtm/dvtm
elif [[ "$(tty)" =~ '^/dev/tty[0-9]' ]] ; then
DVTM=/home/mitch/bin/dvtm-status
fi
[ -x "$DVTM" ] && exec "$DVTM" "screen -d -R -S irssi -t irssi irssi" "$SHELL"
|