# term-type command

The term-type BASIC program reads the
terminal and printer characteristics from attribute 2 of the PIBs
file and automatically sets them, or sets them and updates the permanent
settings for the current line.

## Syntax

```
term-type {(options)}
```

## Parameter(s)

| options | k | Sets the keyboard input translation. |
| --- | --- | --- |
| s | Suppresses all output. | |
The pibs file contains the parameters used by term-type. The Update processor can be used to update the
characteristics for each PIB (port).

When term-type is used without arguments, it does the usual term setting for the
current port by checking the port/control item in the dm,pibs, file.

The item-ID of the port/control item is the port number
for the current line. Attribute 2 of the port control item may contain
a terminal name, as well as the appropriate term characteristic parameters.
If the item is found, and it contains a terminal name, it is assigned
as the D3 terminal type.

VT100 is the default terminal type
for all ports except port 0.

Note: **For UNIX:** If there is
no terminal name, the terminal name is obtained from the UNIX environment
variable, TERM.PIBs *float*. This means that the same port is
not always necessarily attached to the same UNIX PID. For this reason,
the choose.term program is provided with D3. This
should be invoked from each user’s logon macro.

An item
with the same name must exist in the dm,pibs, file. If attribute 2 contains terminal characteristics (such as
the screen size and so on), but no terminal name, the terminal name
is obtained from UNIX and the new characteristics are applied.

If attribute 2 of the pibs file is empty, and either, it is not
a UNIX implementation, or the value of the TERM environment variable
is not found in the devices file, then the terminal type of the previous
logon to that PIB is used. If there was no prior log on, or if someone
has done a reset-user on that PIB, then the terminal
type is determined by the first device compiled into the dictionary
devices ccb item. The initial terminal values are equivalent to term 79,24,0,1,1,8,80,59.

## See also

- [block-print command](https://d3codex.com/tcl/block-print-command/)
- [choose.term command](https://d3codex.com/tcl/choose-term-command/)
- [devices file](https://d3codex.com/systemfiles/devices-file/)
- [keyboards file](https://d3codex.com/systemfiles/keyboards-file/)
- [list-pibs macro](https://d3codex.com/tcl/list-pibs-macro/)
- [pibs file](https://d3codex.com/systemfiles/pibs-file/)
- [set-imap command](https://d3codex.com/tcl/set-imap-command/)
- [setpib0 command](https://d3codex.com/tcl/setpib0-command/)
- [system-coldstart macro](https://d3codex.com/tcl/system-coldstart-macro/)
- [term command](https://d3codex.com/tcl/term-command/)
- [termp command](https://d3codex.com/tcl/termp-command/)
- [user-coldstart macro](https://d3codex.com/tcl/user-coldstart-macro/)
- [users file](https://d3codex.com/systemfiles/users-file/)

---
Source: https://d3codex.com/tcl/term-type-command/ - part of the D3Codex reference.
