BS/DEL with xterm local & remote

Mark Ovens mark at dogma.freebsd-uk.eu.org
Tue Aug 17 21:14:18 BST 1999


On Tue, Aug 17, 1999 at 03:05:12PM +0100, Richard Smith wrote:
> Mark Ovens wrote:
> > 
> > On Mon, Aug 16, 1999 at 03:33:36PM +0100, Richard Smith wrote:
> > > I have a weird problem with xterm. I have a number of _identical_
> > > FreeBSD boxes (running 3.2R) which I talk to using xterm. Key mappings
> > > for DEL and BS for zsh and emacs are pretty much sorted out by their own
> > > configuration files. I notice a difference between the DEL and BS
> > > mapping between a remote xterm and a local xterm when running simple
> > > commands expecting command line input.
> > >
> > > For example, run 'cat' and you can type some characters. A local xterm
> > > maps BS to a backward-delete-char while DEL echos ^?. A remote xterm
> > > maps DEL to a backward-delete-char while BS echos ^H.
> > >
> > 
> > Sounds like the local user has ``stty erase ^H'' somewhere (.login,
> > .{csh,sh}rc etc.)
> 
> Well...
> 
> I don't use any of those files, but I _did_ do some rooting around.
> stty(1) reports that the erase is setup differently on the two xterms,
> as you surmised. 
> 

I just grepped for ``stty'' in ~/.* and .profile contains:

#       $Id: dot.profile,v 1.10.2.2 1997/09/27 15:35:46 joerg Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
echo 'erase ^H, kill ^U, intr ^C'
stty crt erase ^H kill ^U intr ^C
[snip..]

I haven't added this. Mind you, I have to have ``stty erase ^H''
in my .cshrc to use BS as the backward-delete-char, so I'm not
exactly sure as to when ~/.profile is read.

> The termcaps match, and both xterms are of a type TERM=xterm as
> expected. I suspect that /dev/ttyv0 and /dev/ttyp0 are configured
> differently, possibly through gettytab. I'm not really sure.
> 
> But...
> 
> I've added the above line to my zshenv file so that both local and
> remote xterms get the same environment. So I _have_ fixed the problem.
> 
> Thank you for the useful guidance,
> Richard.
> 
> 
> ------ FreeBSD UK User's Group  -  Mailing List ------
> http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users
> 

-- 
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://http://ukug.uk.freebsd.org/~mark/
_______________________________________________________________
Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK
CAD/CAM solutions for Sheetmetal Working Industry
mailto:mark at ukug.uk.freebsd.org              http://www.radan.com






More information about the Ukfreebsd mailing list