Using TTYredirector

Managing tty Devices


The following trconfig commands add, delete, and manage the basic settings for individual tty devices controlled by TTYredirector.

In all commands below, dev specifies TTYredirector tty devices and can be:

A single device name composed of A-Z, a-z, 0-9, +, -, and underscore,

or

multiple device names separate by commas, with no spaces between,

or

the value ALL, signifying all existing TTYredirector devices, can be used except with the -addtty, -deltty and -ttylist options.

Short forms of option names appear on a line following the long form.

For the status values returned by trconfig, see the Technical Notes.

Adding and deleting TTYredirector tty devices

trconfig -addtty dev

Adds new TTYredirector tty device(s) in the /dev directory.

All settings for new device(s) are default values.

If a device exists, there is no error.

No other options can be used with this command.

Note: The Linux kernel limits the number of Unix98 pty devices to a maximum of 2048, and most Linux distributions are configured for 256 by default. Since pty devices are used for various purposes, the number available to be used by TTYredirector will be lower, depending on what other software is running at the time.

trconfig -deltty dev

Deletes the TTYredirector tty device(s).

If a device does not exist, there is no error.

No other options can be used with this command.

trconfig -ttylist dev
trconfig -l dev

Forces the set of TTYredirector tty devices to be exactly dev, adding them as necessary.

Existing tty devices not in dev are deleted.

No other options can be used with this command.

Location of the networked device

trconfig -tty dev -server IP-addr -port TCP-port
trconfig -y dev   -s IP-addr      -p TCP-port

IP-addr — A numeric IP address xxx.xxx.xxx.xxx or a hostname of the device server

TCP-port — The TCP port number at which the device server accepts connections for the specific device

Protocol supported by the device server

trconfig -tty dev -protocol tcp|telnet|telnetcr
trconfig -y dev   -o tcp|telnet|telnetcr

tcp — Raw TCP connections only (default value)

telnet — Telnet protocol, with or without RFC 2217 extensions

telnetcr — Telnet protocol with CR padding

Automatically login to device server

trconfig -tty dev -auth username|none
trconfig -y dev   -a username|none

username — At the beginning of a connection, attempt to detect and respond to a login prompt from the server asking for a user name.

none — Do not detect any server login prompt. (default)

trconfig -tty dev -username name -password pwd
trconfig -y dev   -u name        -w pwd

username — Use this name to respond to a username prompt.

pwd — Use this password to respond to a password prompt.

Automatically restoring failed connections

trconfig -tty dev -restore Y|N
trconfig -y dev   -r Y|N

Y — If the network connection to the server fails, attempt to restore it and continue operation. For more information, see the Technical Notes.

N — Do not restore a failed connection. (default)

Permissions

trconfig -tty dev -chown owner -chgrp group -chmod mode
trconfig -y dev   -chown owner -chgrp group -chmod mode

Sets permissions for using the tty devices.

Any combination of chown, chgrp and chmod options can be used.

owner and group must exist. Default settings for both depend on the version of Linux being used.

mode is 3 digits following the UNIX chmod convention for setting read and write permissions for owner, group, world. The default setting is 666, providing access for all users. Allowed values for each digit are:

0 — no access
6 — read and write access

If the tty option is omitted, settings for chown, chgrp and chmod options modify the default used for any tty device that has not been given its own setting using the tty option.

Resetting and copying device settings

trconfig -tty dev -reset

All options for the tty devices are set to default values.

This command does not affect the settings of general options.

Note: No other command options can be used.

trconfig -tty dev -copyfrom source-dev
trconfig -y dev   -c source-dev

All option settings for the source-dev device are copied to all devices specified by dev.

No other options can be used with this command.

Delaying the close of the device

trconfig -tty dev -ptydelayclose c
trconfig -y dev   -t c

c — The number of milliseconds to delay closing the connection to the server after the tty device has been closed.

Default value is zero (no effect).

For a related global option that applies to all tty devices, see -delayclose in General Options.