Simple serial client lk

lk is a simple terminal client over serial line (aka lightweight kermit).

If you are administrating distant unix servers, you propably know this situation: something goes wrong and after upgrading kernel, doing some nontrivial modifications in network configuration, firewall rules or without obvious reason, the computer no more communicates with you. There is no other way than have a walk to the basement. Or, maybe, the computer is in another building, in another street or another city... A simple and cheap solution is to interconnect computers via serial line.

Usage

lk ([line] [+/-/=switch] [name])*

Line format

The line configuration is created by a concatenation of the following parmeters. Not all of them have to be specified.

Switches

Switches controls the behavior of the line. Each switch must be prefixed with one of the marks: + to enable the feature, - to disable the feature, or = to keep untouched.

Options

User configuration file ~/.tk

Commonly used configurations may get a name and specified here. The syntax of a file is line-oriented, each line starts by a name of configuration followed by a combination of line specification, switches and other configuration names. The final configuration is calculated by applying all the parameters in their order.

Menu

Menu allows to apply special commands during the communication. It is activated by pressing the Ctrl+\ combination, following by the command acronym.

Examples

An example of user configuration file describes a common serial parameters "9600n8 -cc -pc +fc" under the name "default" and for all the computers alpha, beta and gama defines the serial port device. There is no flow control for gama.

# Example ~/.tk
default		9600n8 -cc -pc +fc
alpha		default ttyS0
beta		default ttyS1
gama		default ttyS2 -fc

Download

You can download a tarball lk-0.4.tar.gz. Install it by traditional ./configure, make and make install.

Howto

Init getty in respawn mode on one (server) side and run lk on the other (client) side. Have a look at /etc/inittab and add a line:

T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
It is propable that there will already be a similar but commented line. If getty is not available on your systems, try mgetty or similar.

Contact

Find a bug, have a comment? Send me an email - the email address is at my home page.