craig@charlie.OZ (Craig Bishop) (11/02/87)
I was the author of the qterm rewrite and I forgot to put the manual for qterm in the archive I sent to the moderator of comp.sources.unix. I am sorry for any inconvienence this might have caused. # This is a shell archive. Remove anything before this line, then # unpack it by saving it in a file and typing "sh file". (Files # unpacked will be owned by you and have default permissions.) # # This archive contains: # qterm.1 echo x - qterm.1 cat > "qterm.1" << '//E*O*F qterm.1//' .TH QTERM 1 "30 September 1987" .SH NAME qterm \- Query Terminal .SH SYNOPSIS qterm [ .B \-a ] [ .B \-d ] [ .B \-e ] [ .B \-f ] [ .B \-F ] [ .B \-q ] [ .B \-s ] .SH DESCRIPTION .I 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 .I termcap(5) database. .PP For .I csh(1) users, putting a line in your .I .login file such as: .sp 1 .in +.5i setenv TERM `qterm` .in -.5i .sp 1 should automagically set your terminal type. For .I sh(1) users, putting these lines in your .I .profile file should set your terminal type: .sp 1 .in +.5i TERM=`qterm` .br export TERM .in -.5i .sp 1 .SH OPTIONS .IP \-a Use the alternate string ``<ESCAPE>[c'' when asking the terminal to identify itself. This string is recognized by most ANSI compatible terminals. .IP \-d Use the default string ``<ESCAPE>Z'' when asking the terminal to identify itself. This string is recognized by most ANSI compatible terminals. .IP \-e Use the default .I answerback string ``^E'' when asking the terminal to identify itself. .IP \-f Read the terminal query information from the file .BR $HOME/.qterm . In this way, a user may setup different values for certain terminals. This file is scanned then the standard table is scanned, .I qterm then proceeds to query the terminal with the information provided. If an un-intelligable response is received (or none at all), .I qterm will proceed to use its own information to determine the terminal type. .IP \-F Same as \-f except that the standard .I qterm table is not scanned; only the user's .B $HOME/.qterm file is used. .IP \-q Be ``quiet'' and only print the terminal name to standard output. .IP \-s Display the response received from the terminal in a ``nice'' fashion. .SH "QTERMTAB" The format of the file $HOME/.qterm and .I qterm's master file 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 .I 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. .PP 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 .I control character. (i.e. ``^['' is interpretted as an <ESCAPE>). .PP The standard query sequence is ``^[Z'', however you may wish to use the .I answerback capability of a terminal. This is usually triggered by the ``^E'' character. Some terminals which cannot handle the standard query sequences can do .IR answerback . .PP .I Qterm will work faster if you group together all the terminals which use the same sequence of query characters. .PP Below is a sample file: .sp 2 .nf # # QTerm File # ^[Z\0\0\0\0\0^[[?1;1c\0\0\0\0\0vt100\0\0\0\0\0A vt100 with STP ^[Z\0\0\0\0\0^[[?1;2c\0\0\0\0\0vt100\0\0\0\0\0ANSI/VT100 Clone ^[Z\0\0\0\0\0^[[?1;3c\0\0\0\0\0vt100\0\0\0\0\0A vt100 with AVO and STP ^[Z\0\0\0\0\0^[[?1;4c\0\0\0\0\0vt100\0\0\0\0\0A vt100 with GPO ^[Z\0\0\0\0\0^[iBO\0\0\0\0\0\0\0\0z29\0\0\0\0\0\0\0Zenith in Zenith Mod e .fi .sp .SH AUTHOR Craig Bishop, .br Loosely based on the original program by Michael Cooper. .SH FILES .ta \w'/usr/local/lib/qtermtab\ \ \ 'u /usr/local/lib/qtermtab \- Master table .br $HOME/.qterm \- User's table .br /etc/termcap \- termcap(5) database .SH SEE ALSO csh(1), sh(1), termcap(5) .SH DIAGNOSTICS .IP "\fITerminal not recognized - defaults to dumb.\fP" .I QTerm did not receive a response from the terminal, or the response did not match any that .I qterm has stored internally. Use the \-s option to check to see which is the case. .SH BUGS Many (older) terminals do not send a response to any of the standard query sequences. //E*O*F qterm.1// exit 0