# best terminal type for serial console

## Garbz

Hey all i have a server which i have recently turned into an appliance (no video card cdrom etc)  Just 2 network cards, 2 usb ports, and a serial port COM1 (ttyS0) running agetty as the login server.

I'm administrating it like a switch through the serial interface using a combination of hyperterminal (not the best choice but comes with windows) and minicom.

The question is what is the best terminal emulation to use which provides as much functionality and features as possible but remains compatible with programs which don't write to the screen line by line (i.e. VIM)

Currently i'm running with vt102 emulation in minicom and agetty, but i don't have any color just some minor greyscale differences, folders and links and executables are white, others are grey.

Also when i open up VI or VIM the console defaults to 80x25 rather than using the full realestate of my 1024x768 terminal it usually does.

So is there a better answer?  

pn: ANSI breaks compatability with my cursor keys so i can't use VIM anymore. Whichever terminal emulation i use is required to be usable from vim completely. (i don't want to learn the proper keystrokes  :Smile:  )

----------

## Arno

gtkterm is supposed to be a clone of hyperterminal (or so says its web site).

Don't know for sure if it would fit your needs.

----------

## Garbz

thanks but i was talking more along the lines of backends. not really which app to use to get a terminal up, but what format the terminal emulates.

That said i've also managed to configure the server to send ansi code and minicom to talk in vt102 so i get full color while still being able to use the cursor keys

However! When i open vi it still only uses a 80x25 area of the screen.

----------

## !k

g -

how did you get the redirection over the serial port going?  I have the bios stuff being redirected, but when linux comes up I get nothing.

----------

## Garbz

i read a massive howto and now consider myself an expert that's how  :Smile: :\

My bios doesn't support comm port output so it makes diagnostics a little difficult, but basically everything is done from grub config. (providing that the kernel supports serial over com) Also the getty itself needs to be served to the serial port or you won't be able to log in :S

here's my grubconfig for my linux server (redhat 9.0) or at least the lines required for console:

```
default=0

timeout=10

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1

terminal --timeout=5 serial

 

title  Linux (2.4.20-devfsd)

        root (hd0,0)

        kernel /bzImage ro root=/dev/hda2 console=ttyS0,115200n8 devfs=mount
```

Bsically what this does:

unit = the comm port

speed = baud rate (don't use that speed without short cables   :Wink: 

word = byte length or somthing

parity = parity bit being used or not

stop = stop bits used.

Basically as long as both terminals have the same baud, length, parity, and stop bits set it should work.

the terminal line sets grub to for 5 seconds spam "press any key to continue" to both the terminal and console.  Which ever presses a key gets a grub menu.

The kernel needed the console line attached.  If u want to use a screen AND a comm console add:  console=tty0 as well. But it esentially is simple comm,baud,parity,bytelength.

That will cause kernel message to come on the console and use ttyS0 as primary display. 

The next thing to do is to set the getty to provide a remote login: /etc/inittab:

```
# Run gettys in standard runlevels

#1:2345:respawn:/sbin/mingetty tty1

#2:2345:respawn:/sbin/mingetty tty2

#3:2345:respawn:/sbin/mingetty tty3

#4:2345:respawn:/sbin/mingetty tty4

#5:2345:respawn:/sbin/mingetty tty5

#6:2345:respawn:/sbin/mingetty tty6

s0:2345:respawn:/sbin/agetty ttyS0 115200 vt100
```

I use agetty to serve my serial port and comment out any getty which tries to request the tty0-6 since they will cause errors if no video card is present in the box.

The agetty config is pretty self explainitory.

----------

## Carbs

This works great for me, there is only one extra step you might need.

If you want to login as root on ttyS0 you need to add a line to /etc/securetty.

```
echo tts/0 >> /etc/securetty
```

----------

## JonnyRo

Thanks for all the info, this worked great for me using http://www.eskimo.com/~johnnyb/computers/stl/ on an old laptop.

----------

