# Linux VT220 terminal client

## airspirit

I'm trying to connect a linux box to an old ADP VT220 terminal server and having a bastage of a time doing it.  It connects through a serial port and on the old windows systems we use Prowin2 (procomm) to connect (just set the baud to 9600 and BAM you're in).  I've tried using Prowin2 through win4lin but it doesn't seem to like COM1 (where serial port 1 is pointing to in winsetup), so that's out.  I get no connection or even hint that anything exists there.

Anyway, to make a long story short, is there any way to natively connect to a local VT220 server via a serial connection through linux?  I've seen many places on the web that talk about CREATING one, but not CONNECTING to one.  Any help would be most appreciated.

----------

## funkmankey

tried minicom?

that's the only one I'm familiar with, although emerge -S serial turns up at least two other likely apps...

----------

## airspirit

Minicom only does ANSI and VS102, and I can't for the life of me figure out how the others work.  As far as I can tell they work as a console and I can't figure out how to initiate a terminal connection with them (Eterm and Gnome Terminal).  As for XTerm (which I think may support it), I can't seem to get it to emerge:  even with ACCEPT_KEYWORD="~x86" it says it's still masked.

----------

## grant.mcdorman

Typically, the "terminal emulation" in these cases is not done by the communication program but by the terminal you run it in (xterm, konsole, Linux console, etc.). I don't know why miniterm lists the protocols it supports.

Historically, one could use 'cu' (Call Unix) to do the sort of thing you want. This may work - it's in net-misc/taylor-uucp. You'd do 

```
cu -p /dev/ttyS0 -s 9600 dir
```

 and start typing.

Alternatively, xc may work, as it is also console-based.

GTKTerm might also work, but it's an X app and it's unclear what emulations it supports (there's nothing on the web page).

BTW, VT220 is a superset of VT102, which in turn is a superset of VT100. It's possible that a VT102-type emulation may work just fine, depending on what the app on the other end actually uses.

----------

## airspirit

So, to clarify my understanding here, I should just open up one of the terminal progs (such as Eterm/Gnome Terminal/Xterm, etc) and enter that line (after emerging that package)?  I'll give that a whirl and see what happens ... I'll let you guys know if it works.

edit:

I've tried the following in Gnome Terminal, Eterm, and Xterm as both root and a user with identical results all around.

```
bash-2.05b$ cu -p /dev/ttyS0 -s 9600 dir

cu: No matching ports

bash-2.05b$ cu -p /dev/ttyS1 -s 9600 dir

cu: No matching ports

bash-2.05b$ cu -l ttyS1

cu: creat (/var/lock/subsys/TMP00000016a9): Permission denied

cu: ttyS1: Line in use

bash-2.05b$ cu -l ttyS0

cu: creat (/var/lock/subsys/TMP00000016aa): Permission denied

cu: ttyS0: Line in use

bash-2.05b$ wtf?

cu: lol pwned
```

Last edited by airspirit on Wed Oct 22, 2003 6:40 pm; edited 2 times in total

----------

## funkmankey

yeap, like grant.mcdorman said.

sorry that I was unclear, I guess terminal type stuff can be a little confusing at first. yes, eterm or rxvt should be fine (unmasking XTerm probably not worth the trouble...) and use whatever comms app you prefer (ghod, I'd forgotten cu even existed! ;-)

plus, I think a lot of the vt220 extension was mostly in the various special keys...?

hehe in fact, right now I'm looking for actual vt220 displays (or 320,420,520, etc.) to use as consoles on my servers. I know my school junked a huge pile of them a few years ago, but back then I didn't realize I would want it in future! too bad there are no more MIT flea swaps this year... bleh.

----------

## airspirit

Sorry, but you beat me to the edit.  See above.  I don't understand why it would give me a line in use message, and I sure as hell don't understand the gibberish above it.  I'm going to do a bit more research on the win4lin side as well to see if I can patch com1 through to WinME ... I already have a VT220 terminal emulator all set up and ready to run, but I can't seem to access the port.  I would absolutely hate doing that though ... the whole point here is to migrate the business away from Winblows completely.

edit:  trying to find info on GTKTerm now ... I don't know how I missed that in his post, and this is one undocumented program if ever there was one.

----------

## funkmankey

I think at this point it's not so much which terminal you're using, as getting the actual connection going.

you should see something like this (more or less...)

```
%cat /proc/tty/driver/serial

serinfo:1.0 driver revision:

0: uart:16550A port:000003F8 irq:4

1: uart:16550A port:000002F8 irq:3

2: uart:unknown port:00000000 irq:0

3: uart:unknown port:00000000 irq:0

4: uart:unknown port:00000000 irq:0

5: uart:unknown port:00000000 irq:0

6: uart:unknown port:00000000 irq:0

7: uart:unknown port:00000000 irq:0
```

ohhhhh... you might want to use

```
cu -l /dev/ttyS0 -s 9600 dir
```

instead of -p, but check the manpage 'cos I really don't remember.

(or /dev/ttyS1 if you have it hooked to serial port B instead of port A...)

EDIT: also, you probably need write access to the serial device, so either put your user into the "tty" group (if you have one) and make sure tty can group rw on the device, or just su to root if you really have to... /EDIT

----------

## airspirit

Since this is a guineapig machine so I can determine settings for all of the others, "user" is in every group including root, hehe.  For some reason the machine (particularly the x server) still makes a distinction between the two, but I have literally dumped "user" into everything while I've been testing things out.

On a lark, I'm going to chmod 777 ttyS* and see if that helps anything.  I've also got a lead on connecting via win4lin ... I neglected to install the Com ports inside of windows ... doh!  As I said, though, using a unix terminal emulator inside of a windows emulator inside of a linux box to connect to a unix box is NOT my idea of an ideal setup, so I would really like to get this to run through linux proper.

----------

## funkmankey

couple things that may help:

/var/lock/subsys is group-owned by uucp, so your user needs to be added into the uucp group.

/dev/ttyS0 etc. (or /dev/tts/0) are probably group-owned by tty, so you need to add uucp into the tty group.

EDIT: also, don't forget that you need to log out and back in again for group type stuff to take effect... /EDIT

----------

## airspirit

Ooh, didn't think of that.  When I emerged uucp I didn't add user to that group nor relog.  I'll give that a shot and see what happens.

----------

