[SunHELP] stty erase

Ledger, David sunhelp at sunhelp.org
Wed Mar 28 09:59:25 CST 2001


I have a solution that works when all remote access is via remsh host xterm
-display .......

It is complex just to fix this problem, but it can fix many other things as
well if its all set up right

I have a $HOME/.prefs directory.  I there I have stty.<HOST>.<OS> files
containing the 'stty -g' o/p
for an <OS> when used from the keyboard on <HOST>.

I have a method of ensuring that my current DISPLAY is correct, even if
/etc/profile messes it up.
In my .profile I generate a 'display' variable based on $DISPLAY.  If it is
dhcp allocated, this gets
modified to 'PC' (assuming eXceed, ReflectionX etc.).  Thus $display refers
to the keyboard I am using.
I have 3 ksh functions, kswap, ksave & kset.  kswap just swaps the erase &
kill chars.  ksave puts
stty -g o/p into the prefs file for that host|$display|keyboard with the
current OS.  kset sets stty from
the appropriate prefs file.  OS is only relevant if home is NFS mounted.
My .profile looks for the appropriate prefs file & uses it.
First time onto a host from a keyboard, I use stty or kswap to get it right,
then ksave it.  From then on
it just works.  It's especially useful when some hosts are HPs with a wide
variety of keyboard layouts.

HP-UX also has a ttytype command that interrogates a terminal to see what it
is.  This works over telnet.
A Solaris version would be handy.  Anyone know of one?

I also cache PATH and MANPATH per host in a similar way.

David

This is my opinion only, and not that of my employer who is ... me ..
Unless the contents indicate otherwise, it has no connection with my current
client whose email services I am using.
David Ledger - Freelance Unix SysAdmin & chair of HP/Works SysAdmin SIG
dledger at ivdcs.demon.co.uk - becoming dledger at ivdcs.co.uk
www.ivdcs.demon.co.uk - becoming www.ivdcs.co.uk


v v v v v v v v

 I used to login from my IRIX box to Sun server (Solaris 7) and had
     stty erase ^H
 line in the .profile.
 Now I have a couple of guys sharing the same account with me.  They have to
 login to the box, but they are on Linux stations and they have to type
     stty erase ^?

 Is there any way to determine a type of a machine I'm coming from (to put
 some "if - else" statement into .profile)?
 Or is there better solution?
=====================================================================
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
gpupower.co.uk or postmaster at npower.com

This outgoing e-mail (and any attachments) has been checked
(using Sophos Sweep 3.43 + patches) before leaving us (UK 08457 353637),
and has been found to be clean from any virus infection.

=====================================================================



More information about the SunHELP mailing list