Display or set the terminal type (QNX)
termdef [-c command] [-I] [-e] [terminal_type] termdef -s [terminal_type] termdef - [terminal_type]
The termdef utility is used for setting and querying the terminal type. It can be used from tinit, where it will establish the terminal type and then exec() into another command (usually login). It can also be used inside the shell to set or query the terminal type currently being used (termdef - or termdef -s).
Using the specified terminal type (or the type currently defined by the TERM environment variable if -e is given), termdef:
Having configured the tty, termdef exec()s into a command that inherits the TERM environment variable from termdef. By default, this command is:
To use another command, you specify the -c option.
If a terminal type isn't specified or if -e isn't given, the user will be prompted for the terminal type. The user can obtain a list of valid terminal types by pressing Enter or by entering an invalid terminal type.
Specifying the -e option or a terminal type on the command line normally prevents the user from being prompted. However, if the terminal type defined by TERM is invalid, termdef displays a warning message and the user is prompted for a terminal type, as if -e weren't specified.
When invoked without the - or -s options, termdef establishes a terminal type and exec()s into another command (login, by default).
You can use termdef from the shell in a manner similar to the UNIX tset utility. To display the current terminal type, use:
To change the terminal type, use one of the following:
|termdef - terminal_type||Write the new terminal_type to the standard output|
|termdef -s terminal_type||Write the shell command for setting TERM to the standard output|
|termdef -s||Do the same as the above command but prompt for the terminal type|
Set up ser2 and ser3 to prompt for a terminal type, and exec() into login once the terminal type is established:
tinit -c "termdef" -T ser2 ser3 &
Assuming ser1 has a VT100 terminal on it (hardwired), have termdef set up the tty and TERM variable, then exec() into login, without prompting for terminal type:
tinit -c "termdef vt100" -T ser1 &
tinit -c "termdef -e" -T ser1 TERM=vt100 &
Display the terminal type:
Change the terminal type to VT100:
export TERM=`termdef - vt100`
`termdef -s vt100`
Prompt the user to specify a new terminal type:
infocmp, stty, tic, tinit