SUMMARY : Help with terminal problems!!

From: Jim Murff (murff@irt.com)
Date: Thu Jul 01 1993 - 01:12:43 CDT


Hello;

Thanks to the list for the help. I have included the original query at the end
of this message. Basically, I am trying to get different terminals to work
automatically and be set up at login time. I received help from several people.

The overiding feeling I get is "tset sucks!" {pardon my french :) }. I am
going to use "qterm" which I happened to get off the CDROM from the book
"UNIX Power Tools" by O'Reilly/Bantam. (A GREAT MUST HAVE BOOK BTW IMHO!).
As far as I can figure tset is not behaving in any predictible way. When I got
it to set my terminal, all my command line editing (via TCSH) went to heck.

Peter Farmer did send me some advice and samples on "tset" which I will
be glad to foward to anyone who asks. I choose to forget about tset...

Michael Reynolds provided part of the solution I will use (Thanks Michael!) ::

>Look into a program called qterm on the net. It works much better that tset
>because it send a query string directly to the terminal and based on the
>uniq return string sets the TERM variable according to a lookup table of
>return strings. The only problem I had to get around is that the sun
>console terminal itself does NOT respond to any of the query strings. So
>I do something like this in each users login scripts...
>
>if [ $TERM != "sun" -a $TERM != "sun-cmd" ]
>then
> TERM=Unknown
> TERM=`/usr/local/bin/qterm`
> if [ $TERM = "Unknown" ]
> then
> echo -n "TERM="
> read TERM
> fi
>fi
>export TERM
>
>Once you get the tab file of response strings set up it work great!

Charlie Finnell also came up with this scheme that I plan to use (Thanks
Charlie !) ::

># Set standard terminal characteristics and the TERMCAP variable:
>if ( $?TERM ) then
> set noglob
> unsetenv TERMCAP
> if ( "$TERM" == "hp98550a" ) setenv TERM hp
> if ( "$TERM" == "hpterm" ) setenv TERM hp
> if ( "$TERM" == "unknown" || "$TERM" == "dialup" || "$TERM" == "network" ) set>env TERM vt100
> if ( "$TERM" == "vt300" ) setenv TERM vt100
> if ( "$TTY" == "/dev/console" || "$TERM" == "sun3" || "$TERM" == "sun132") se>tenv TERM sun
> if ( "$TERM" != "xterm" ) eval `/usr/ucb/tset -sQ -m :$TERM`
> unset noglob
>endif
># Fix some terminal characteristics that may have been set wrong:
>if ( $?TERM ) /bin/stty crt erase '^H' werase '^?' kill '^U'
># Fix vt100 screen size problem: (CAF 04OCT91)
>if ( $?TERM ) if ( "$TERM" == "vt100" ) /bin/stty rows 24 cols 80

I think a combination of both solutuons will work for my needs. Thanks for
all the help.

Special thanks to ::
--------------------
reynolds@icgmfg.mke.ab.com (Michael D. Reynolds)
Charles A Finnell <finnell@portia.mitre.org>
Peter Farmer <Peter.Farmer@cs.anu.edu.au>
alan@fred.aukuni.ac.nz (Alan McCulloch)
vasey@issi.com

----------------------- ORIGINAL MESSAGE --------------------------------------
Hi;

        I am having a heck of a time with terminal setup. I am trying to get
"tset" to work when users log in from different places. The problem is it
doesn't appear to be reading the ttytab to get port type as the man pages say it
will. I also have the Nutshell book "termcap & terminfo" which clearly states
tset uses the /etc/ttytype if it exists, if not it uses /etc/ttys. The Nutshell
book shows /etc/ttys as ::

>tty0e "/usr/etc/getty std.9600" unknown off local secure
>ttyp0 none network off secure

This is the what my ttytab looks like!! My /etc/ttys looks like ::

>12console
>12ttya
>12ttyb
>02tty00

I am getting very confused. I am trying to use .login to make users have a more
correct terminal setup so they can get editors etc. to work when they log in
from different places. I have this line that I am using to test with (in .login)
::

        set noglob
        echo ""
        eval `tset -s -Q -m 'dialup:?vt100' -m 'network:?vt100' -m ':?sun-cmd'`
        echo ""
        unset noglob

According to everything I have read including the new book "Unix Power Tools"
by Bantom/O'Reilly this should work, except it doesn't!! I get this on login :

>TERM = (sun-cmd) ?

Everytime! No matter what portname or type is in /etc/ttytab.

If I change ':?sun-cmd' to 'unknown:?sun-cmd' it just logs me in and
sets TERM based on ?? It is not looking at the port discription in "ttytab" and
according to what I can gather my /etc/ttys file (which sun man pages say DO NOT
EDIT) is not the format "tset" is looking for, so no wonder it causes the empty
string test (:?sun-cmd) to trigger. Can anyone shed some light. I am getting
heat about terminal set-up and it is becoming an issue. ANY help would be
greatly appreciated. I think I am suffering from terminal overload :)

And just for the record EVERY BOOK SAYS THIS IS LEGIT ::

>eval `tset -s -Q -m '?vt100'`

but I get this ERROR -

>Too few args: ?vt100
>usage: tset [-] [-nrsIQS] [-eC] [-kC] [-iC] [-m [ident][test speed]:type] [type]

HELP !!

SUN IPX,IPC's using 4.1.2 and 4.1.3.

Thanks for your time;

-Jim Murff

-------------------------------------------------------------------------------
Jim Murff (murff@irt.com) Voice # (619)622-8878
IRT Corp, San Diego, CA. Corp # (619)450-4343
System Software Engineer/System Admin. Fax # (619)622-8888
-------------------------------------------------------------------------------

----- End Included Message -----



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:59 CDT