Master Mitch - Using a WYSE 160 terminal with Linux

[dvtm] [higher resolution] [Linux configuration] [terminal configuration] [UTF-8]


  News

2008-10-12: Using a WYSE 160 terminal with Linux
Mention dvtm, add link to Debian package ncurses-term-mitch

2005-10-15: Using a WYSE 160 terminal with Linux
Describe how to use the terminal with an UTF-8 locale.

2005-06-29: Using a WYSE 160 terminal with Linux
Describe how to use a higher resolution.

Linux configuration

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.

terminal configuration

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):

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

higher resolution

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:

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).

UTF-8

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 its 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!).

dvtm

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"