Terminals Under the UNIX Operating System

BBj-Specific Information

In BBj, realname is ignored, and the terminal on which BBj is invoked is used as the device to which the terminal alias is opened.

Mode

Description

CAPTURE

In BBj 6.0 and higher, the capture mode forces new character windows in a BBj SysConsole or TermConsole to inherit the contents of underlying character windows just as character windows do in PRO/5 or the Visual PRO/5 SysWindow. The capture mode removes the need to use the 'CAPTURE' terminal device mnemonic to produce this behavior.



PRO/5-Specific Information

On invocation, PRO/5 will first attempt to determine if it is attached to a terminal. If it is, PRO/5 will get the terminal name and scan the ALIAS lines read from the config.bbx file, attempting to match the realname field. When PRO/5 has a match of the terminal name from the system and a realname from an ALIAS line, the bbxname is remembered and used as the device for the FID(0). For users with unusual configurations, all of the searching may be overridden using the "BBTERM=" environment variable. This variable, if set, overrides the terminal name lookup and makes PRO/5 open the aliased device named in the "BBTERM=" variable. For example, BBTERM=T0 forces PRO/5 to open the device on the line beginning with ALIAS T0 .

If PRO/5 cannot find an alias line fitting your terminal after reading config.bbx, it will use a device named "IO" for your channel 0 device. This is a device always present in PRO/5. Opening and reading the "IO" device is a direct attachment to your stdin and stdout handles. Remember that the "IO" device is not a terminal and will not translate mnemonics sent to it, nor will it report the same information in the FIN(0) that a terminal will. This can cause some interesting problems in starting software on a terminal running as "IO." These problems normally show up as reports of "garbage on the screen" or !ERROR=41 after starting your application.

All terminals used in PRO/5 are defined in the config.bbx file using an ALIAS line in the following form:

alias bbxname realname type modes

Parameter

Description

alias

Identifies the following information as an alias (i.e., bbxname is an alias for realname).

bbxname

Refers to the name of the terminal. PRO/5 terminal names are normally in the range of 'T0'..'T9', 'TA'..'TZ'. Some application code may expect terminals in the range 'T0'..'T99'. All terminal names in PRO/5 start with the letter "T." For TCP/IP and UDP sockets, the bbxname must begin with "N".

realname

Must be the UNIX operating system name of the terminal device, such as "/dev/tty00" or "/dev/console." For TCP/IP and UDP sockets, use "tcp" or "udp", respectively.

To find out the system name of each of your terminals, login on each terminal and type the command:

tty

The name of the terminal device should come back. If an error message, such as "not found" is printed, then try the command:

who am I

This command will indicate which terminal device you are using.

type

Refers to the entry in the termcap file you wish to reference for this terminal device. If you are unfamiliar with termcap file usage, see Introduction to Termcap in the User's Reference Guide.

PRO/5 has two ways of determining your terminal type. The TERMINAL DEVICE TYPE field may specify the actual termcap name for a terminal, or it may say "term". If the type is "term" then PRO/5 will look at the TERM= environment variable to determine the terminal type. This environment variable is a standard used by many software products to determine terminal type and may be set prior to invoking PRO/5 with a UNIX operating system command such as:

TERM=vt100; export TERM If your UNIX OS shell is /bin/sh

or

setenv TERM vt100  If your UNIX OS shell is /bin/csh

The install utility will automatically set your terminal type to "term" causing PRO/5 to use the TERM= environment variable. If you wish to force a particular type in the config.bbx file, you will have to edit the config.bbx file.

Many UNIX systems will set TERM automatically when you login. To see the current value of a terminal after you login, use the command

echo $TERM

modes

Specifies additional information about the terminal device.

 

Mode

Description

 

keywait=int

The KEYWAIT mode may be defined for a terminal working in an environment where the input stream is subject to random delays. If a system places a delay between two characters randomly, the delay will eventually be placed between two characters sent by a function key. Because PRO/5 uses timing in determining when a character is part of a function key transmission, the random delay could make PRO/5 decide that the input is not a function key, and thus not perform a translation.

The default value for the keywait is two seconds.

 

k0

This is given for terminals whose function keys are described such that the termcap 'k0' entry is really function key 1. In this instance, you should place the entry 'K0' into the modes field. (See the Termcap Technical Reference Overview in the User's Reference Guide for further detail.)

 

abort=nn

This defines the signal that generates the abort signal. PRO/5 attempts to map this character out of range. In general, character 00 or 0F will prevent a user from generating this signal. However, there is no way for PRO/5 to know in advance which character is out of range. This mode allows you to define it.

Example

alias T1 /dev/tty1a wy60 k1,keywait=3