LINUX GAZETTE
[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]

"Linux Gazette...making Linux just a little more fun!"


How to use an Atari ST machine as a Linux terminal

By Matthias Arndt


Abstract

This article should help you with connecting your old trusty ST to your Linux box as a terminal.

Introduction

Before I start, many things mentioned in this article apply to other boxes than an Atari ST as well. For sure, you could use an Amiga or a Sinclair QL as a terminal as well. (Linus had a Sinclair QL, by the way, before he got his PC.)

Actually I started computing on the Atari ST about more than 10 years ago when my brother bought an Acorn Archimedes and I got his old 520STM. So this is why I love ST emulators and the good old games today. Now I still have a functioning ST (actually a newer 1040STFM I bought secondhand) and I thought about using it for more than as a video game system.

This lead me to use it as a terminal on my Linux box. I must admit, I do not have any reason to connect a second terminal to my Linux box as I'm using it alone. Simply, it's experimenting and ST nostalgia :).

Now this solution can be used to transfer files and programs to the ST and finally to give the ST limited Internet access. If the terminal emulator is good enough, you can use lynx and w3m to surf the web, read mail with mutt and read news with tin or slrn. You can even play 2-player games for the console like Nettris with this solution.

But now lets face it.

What is a terminal?

A terminal is simply a display with keyboard, only capable of displaying incoming text, perhaps with special attributes coded into so-called escape sequences and capable of sending the keystrokes to the remote end.

In general a hardware terminal is dumb. It cannot do anything more than that.

In ancient times of computing, terminals were used to connect multiple users to a mainframe.

If you have such an old-style terminal or you can get one, you can connect it in the same way as described here.

The functions of a terminal--receiving, transmitting and displaying--can easily be achieved using software. And this is the way we go here. We use special terminal software to make the ST acting as an old-time terminal.

Hardware needed

You need the following hardware for this project:

  1. an Atari ST computer with preferably 1MB of memory or more
  2. either a monochrome monitor for the ST (SM124 rocks!) or a colour display with good display quality and hopefully capable of 60Hz
  3. a null modem cable that connects to the serial socket of the ST and the PC
  4. finally a Linux or similar Unix box with enough hardware to support more than one user (anything with a 486er or more should work perfectly)

As stated above in general you can substitute the Atari ST machine with any other computer that has a RS232 socket and a 80column display.

You can use real terminals in the same fashion, although you cannot download or upload software then.

Software requirements

  1. a Linux kernel with serial support
  2. a getty capable of using serial lines (agetty or mgetty both work well)
  3. lrzsz for ZModem transfer (optional)
  4. kermit for Kermit file transfers (optional)
  5. software for the ST
  6. many useful console applications to be used from the terminal (supplied with your Linux distribution)
If you use another machine than an Atari ST, you need a terminal program capable of either VT100 or ANSI emulation and file transfer.

The kernel shouldn't be a problem. If you can use your external serial modem to connect to the net, everything should work out of the box.

In most cases, the kernel will have serial support compiled in or supplied as a kernel module. If not, you must compile a new kernel. I will not handle this in detail here, there are several HOWTOs on this subject available.

putting the login prompt on the serial line

This step is required to give the ST a login prompt over the serial line.

First you need a suitable getty. Such a program is used to display a prompt and the input prompt for the username on the line. In invokes the program /bin/login then to login the user to the system.

The getty processes are all spawned by the init process. Init knows form the file /etc/inittab which getty processes to spawn.

Most distributions ship either agetty or mgetty, or both. I use agetty and so this focuses on using agetty.

Now become root and open /etc/inittab with your favourite editor.

The next step is to add a line to the file to spawn a new getty process. This looks like this:

S0:12345:respawn:/sbin/agetty -w -h -L 19200 ttyS0 ansi

Looks ugly, huh? No fear, I'll tell you the meaning of its components.

I assume the parts of the line with 1 being the left most (S0). Now in numbered order:

  1. S0 - this one is a unique indicator of the line, it is just a mark but it must be unique in the whole /etc/inittab file
  2. 12345 - these are the run levels at which the getty should be called
  3. respawn - this tells init to restart the getty process after completion
  4. /sbin/agetty ... - this line is the actually command line used to launch the getty process described in the following part

Now save the file and leave your editor. Type init q in your shell to tell init to reread its inittab file.

agetty and its command-line arguments

First, give the full path to agetty. If you don't know where it is located, try a locate bin/agetty in a shell.

Then you may have one or more of the following command-line arguments. (See the previous section for an example.)

-w tells agetty to wait for a CR (ASCII 13) on the line before displaying the prompt

-h tells agetty to use hardware flow control on the line (aka RTS/CTS)

-L tells agetty that this is a local line. It will not monitor the carrier then.

## This is the baud rate to be used. 19200, 9600 and 2400 are good values. The ST cannot handle more than 19200.

ttyS? This is the serial device to be used. Use: ttyS0 for COM1, ttyS1 for COM2 and so forth. Make sure not to use your modem port. If you only have one serial port, you'll have to switch between modem and terminal. in such a case it is better to use mgetty as this can handle both incoming and outgoing calls at once on one line (intended for modem usage however).

ansi is the terminal type to used. You could try vt100 or atari as well depending on the capability of your terminal software.

When in doubt, running man agetty in your shell will help you.

ST setup

First of all connect the both machines with the null modem cable. The ST has a socket with a phone symbol next to it. This is the serial port.

You may need an adapter cable that converts DB25 to DB9 or vice versa because the ST has a broad port while most PCs have a small one. Null modems may be found in your local computer store. Buy one that fits to your PCs serial port and an adaptor that connects the null modem to the ST.

Now load the terminal program on the ST. Make sure to set it to the same baud rate as given to agetty and to 8N1. Press Return several times. You should get the login prompt of your Linux box on the ST screen and you should be able to login and to use line oriented shells and programs.

You can try curses-based programs to check the capabilities of your terminal software. With good terminal software, you should be able to use lynx, w3m, mutt and vi. Some terminal emulators are even able to display the Midnight Commander correct and with colours.

recommended ST software

The VT52 emulator supplied with your ST can be used for simple tasks and for testing. It lacks a decent ANSI terminal and file transfer options.

If you're ST is equipped with more than 1MB of RAM, you should give Rufus or Connect a try.

ST Term works well with half-Meg STs. The VT52 Emulator together with an ANSI enhancer is a good choice as well due to memory problems.

ANSITERM features full ANSI support including colours and 80 column display in low resolution. However you'd better use a good monitor or your eyes will be ruined.

TAZ runs in medium and monochrome resolution. It features even 16 colours with page flipping and palette switching technology in medium resolution. However this mode requires a monitor capable of 60Hz.
The interface looks much like minicom or telix and is pleasing.
I recommend this program because the terminal emulation is very good and it has nifty features. It may even run with halfmeg STs, haven't tried it.

Make sure to use 80 columns because most programs do not work well with less.

If you have one, the monochrome monitor is definitely better. However you'll miss colours. With TAZ you shouldn't have many problems.

The following FTP server has several ST programs available for download. ftp://wuarchive.wustl.edu/systems/atari/umich.edu/

transferring files

This feature is one of the main reasons to connect the ST via null modem. Either to save your old ST files or to use software downloaded from the net.

You should use the ZModem protocol because it's:

Make sure you have a ZModem receiver and sender on the ST end.

To transfer a file from the Linux box to the ST, simply type:

sz filename
at your shell prompt. Now invoke the receiving process on the ST end. Some terminals are able to autostart a Zmodem download.

The other way round is as easy. Type:

rz
at your shell prompt. Then activate the ZModem upload function of your terminal software.

If it hangs, press Ctrl-C several times. If all fails, kill the rz/sz process on the Linux box.

Conclusion

If you have the right hardware handy, this is a straightforward thing and pretty easy to setup. I found that the trickiest part was to find suitable terminal software for the ST end.

other systems as terminals

You are not limited to connect an Atari ST as a terminal. Of course, you can use a Commodore Amiga or a Sinclair QL as well. The system used should be able to match into the following pattern:

You can do the same things with them as with the ST.

I hope this all helped you to have some more fun with your old machine and to learn a little bit more about pre-cheap-Ethernet remote working.

Matthias Arndt

I'm a Linux enthusiast from northern Germany. I like plain old fifties rock'n'roll music, writing stories and publishing in the Linux Gazette, of course. Currently I'm studying computer science in conduction with economics.


Copyright © 2001, Matthias Arndt.
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 70 of Linux Gazette, September 2001

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]