DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ct(C)


ct -- spawn getty to a remote terminal

Syntax

ct [ -wn ] [ -xn ] [ -h ] [ -v ] [ -sspeed ] telno ...

Description

The ct command dials the telephone number of a modem that is attached to a terminal, and spawns a getty process to that terminal. telno is a telephone number, with equal signs for secondary dial tones and minus signs for delays at appropriate places. The set of legal characters for telno is 0 through 9, -, =, *, and #. The maximum length telno is 58 characters. If more than one telephone number is specified, ct will try each in succession until one answers; this is useful for specifying alternate dialing paths.

ct will try each ACU line listed in the file /usr/lib/uucp/Devices until it finds an available line with appropriate attributes or runs out of entries. If there are no free lines, ct will ask if it should wait for one, and if so, for how many minutes it should wait before it gives up. ct will continue to try to open the dialers at one-minute intervals until the specified limit is exceeded. This value can also be set on the command line by specifying the -wn option, where n is the maximum number of minutes that ct is to wait for a line.

The -xn option is used for debugging. It produces a detailed output of the program execution on stderr. The debugging level, n, is a single digit; -x9 produces the most detailed output. If the -v option is used, ct will send a running narrative to the standard error output stream.

Normally, ct will hang up the current line, so the line can answer the incoming call. The -h option will prevent this action. The -h option will also wait for the termination of the specified ct process before returning control to the user's terminal.

The data rate may be set with the -s option, where speed is expressed in baud. The default rate is 1200.

After the user on the destination terminal logs out, ct prompts, Reconnect? If the response does not begin with the letter y, the line will be dropped; otherwise, getty will be started again and the login: prompt will be printed.

To log out properly, the user must type <Ctrl>d.

(Of course, the destination terminal must be attached to a modem that can answer the telephone.)

Whenever ct makes a successful connection, it writes a log file, /usr/adm/ctlog. This log file contains the login name of the user who invoked ct, the speed of the connection, the date and time of the connection, the length of the connection, and the telephone number that was dialed. The time of the connection is shown as minutes:seconds or as hours:minutes:seconds, depending on how long the call lasted.

For example:

   root	( 1200) Mon Sept 16 14:55	1:25	264
In this example, the ctlog shows that root invoked ct at 1200 baud on Monday, September 16 at 2:55. The connection lasted 1 minute and 25 seconds and the telephone number dialed was 264.

Limitations

In hangup mode (-h not specified), when a suitable dialer has been allocated, ct prompts Proceed to hang-up? If the response does not begin with the letter y, the program simply exits. If you are logged in on a computer through a local terminal and you want to connect a remote terminal to the computer, you should use nohup with ct to accomplish this:

nohup ct -h -sspeed phone After the command is executed, a login prompt is displayed on the remote terminal. The user can then log in and work on the computer just as on a local terminal.

Files


/usr/lib/uucp/Devices

/usr/lib/uucp/LCK..
(tty-device)

/usr/adm/ctlog

See also

cu(C), getty(M), login(M), uucp(C)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003