QTERM
Section: User Commands (1)
Updated: 29 April 1987
Index
Return to Main Contents
NAME
qterm - Query Terminal
SYNOPSIS
qterm
[
-a
]
[
-f
]
[
-F
]
[
-s
]
[
-q
]
DESCRIPTION
Qterm
is used to query a terminal to determine its name.
This is done by sending a special sequence to the terminal,
reading in a response, and comparing it against a master table of possible
responses.
The ``name'' printed to standard output should be one found in
the
termcap(5)
database.
For
csh(1)
users,
putting a line in your
.login
file such as:
setenv TERM `qterm`
should automagically set your terminal type.
For
sh(1)
users, putting these lines in your
.profile
file should set your terminal type:
TERM=`qterm`
export TERM
OPTIONS
- -a
-
Use the alternate string ``<ESCAPE>[c'' when asking the terminal to
identify itself. This string is recognized by most ANSI compatible
terminals.
- -f
-
If the file
$HOME/.qterm
is present, it's contents are scanned to produce information for
querying terminals. In this way, a user may setup different values
for certain terminals.
After the contents of this file have been scanned,
qterm
proceeds to query the terminal with the information provided.
If an un-intelligable response is received (or non at all),
qterm
will proceed to use its own information to determine the terminal
type.
- -F
-
Same as -f except that the standard
qterm
table is not scanned; only the user's
$HOME/.qterm
file is used.
- -s
-
Display the response received from
the terminal in a ``nice'' fashion.
- -q
-
Be ``quiet'' and only print the terminal name to standard
output.
QTERMTAB
The format of the file
$HOME/.qterm
and
qterm's
master file
/usr/public/lib/qtermtab,
consists of four fields each seperated by white space (tabs and/or spaces).
The first field is the string that should be used to query the terminal.
The second field is the string to expect in response to the query.
The third field is the terminal name (compatible with
termcap(5))
to print to standard output.
The fourth field is optional and may contain a description of the exact
manufacturer and model name of the terminal to be used in a message
printed to standard error.
Blank lines or lines starting with the character ``#''
are ignored and may be used as comment lines.
A character preceeded by a ``^'' is taken to mean the
control
character. (i.e. ``^['' is interpretted as an <ESCAPE>).
Below is a sample file:
#
# QTerm File
#
^[Z ^[[?1;1c vt100 A vt100 with STP
^[Z ^[[?1;2c vt100 ANSI/VT100 Clone
^[Z ^[[?1;3c vt100 A vt100 with AVO and STP
^[Z ^[[?1;4c vt100 A vt100 with GPO
^[Z ^[iBO z29 Zenith in Zenith Mode
AUTHOR
Michael A. Cooper,
University Computing Services,
University of Southern California.
FILES
/usr/public/lib/qtermtab - Master table
$HOME/.qterm - User's table
/etc/termcap - termcap(5) database
SEE ALSO
csh(1), sh(1), termcap(5)
DIAGNOSTICS
- Terminal not recognized - defaults to dumb.
-
QTerm
did not receive a response from the terminal, or the response
did not match any that
qterm
has stored internally. Use the -s option to check to see which
is the case.
BUGS
Many terminals do not send a response at all.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- QTERMTAB
-
- AUTHOR
-
- FILES
-
- SEE ALSO
-
- DIAGNOSTICS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 06:31:21 GMT, December 12, 2024