Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 1997 16:14:37 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        jlemon@americantv.com (Jonathan Lemon)
Cc:        terry@lambert.org, imp@village.org, andrew@erlenstar.demon.co.uk, brian@awfulhak.demon.co.uk, brian@utell.co.uk, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Backspace = ^H
Message-ID:  <199703262314.QAA29104@phaeton.artisoft.com>
In-Reply-To: <19970326170106.52908@right.PCS> from "Jonathan Lemon" at Mar 26, 97 05:01:07 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > This is an idiotic premise.
> 
> Why, thank you.  I agree too that it _is_ idiotic.  
> (The behavior, not the premise, that is)

Sorry; I had a hard time choosing the word (aphasia)  The word I
wanted was "absurd", which doesn't have the connotations of me
implying that I thought you were an idiot.  It was not my intent
to do that.


> > Then the tset will set the user's erase correctly; from the tset man
> > page:
>  
> Huh.  From the termserver, everything looks like a vt100.  (Or whatever the
> hell default you picked).  No way to differentiate vt420's, vt220's, DG210's,
> xterms, wyse50's or whatever.  Yes, we do ask the user what terminal they
> use on login, thankyouverymuch.

That asking, coupled with "tset", should resolve your delete key
as erase character settings.  If you have problems with the user's
not picking the right one, if they are all ANSI terminals, then they
will respond to the ANSI "terminal identification sequence".  There
are a number of programs in the comp.unix.soruces that do automatic
terminal identification using this sequence.


> This quite assumes that the application is actually using 'kb'.  In most 
> cases, this isn't true.  The application is using '^h', or '^?', which
> has been hardcoded into the application.  Take a look at netscape, for
> example.  It ignores your stty erase or termcap setting.  Same w/emacs.
> Same w/oracle.

Or that the application is using the POSIX tcgetattr().

Yes.  This may be a bad assumption, as you pointed out below:

> Oracle and termcap?  Bwahahahah.....  Oracle don't use termcap.  Oracle
> don't use terminfo.  Oracle use _OWN_ term format.  Oracle smart!  NOT.

In this case, you must make the hardware conform to whatever the
vagries of the software are.  It's the same problem with using a
Televideo terminal with VMS.  8-(.


> > If your termcap is correct and it's not obeying it, use pcvt, or
> > change your cons25 keymap in an /etc/rc.* and specify a modified
> > termcap entry for the cons25 to make Orcale happy.  Then contact
> 
> What do you think we're doing now?

Well, this is the correct way to do it.  But that doesn't make Oracle
right.

Actually, since all your terminals have "delete as backspace character",
you should be able to use tset to get the terminals to work correctly.

In point of fact, the problem you're having is that your Oracle is
wanting a '\177' sent by the "backspace character" regardless of
whether it's a reasonable thing to want.  Hacking your keymap is the
only fix -- but again, Oracle is not the be-all, end-all of correctly
written software.  Which means that you hacking away from the default
is not a bad thing, it's an expected workaround.


> > Oracle support and get them to fix their product (the suggested
> > workaround will continue to function after you obtain corrected
> > product).
> 
> Try this, and you will get to listen to Oracle tell you that *you* are
> doing the wrong thing.
> 
> Now, don't get me completely wrong, I can understand how having BS=0x7f
> may be the 'wrong' thing to do, from a purists' point of view.  But trying
> to change application behavior (like emacs use of ^H, which is what got
> me into this thread) is fighting a losing battle.

But the application should not dictate the OS's default behaviour, only
the available non-default behaviours for which the OS can be configured.

As I said previously, if you were to use PCVT, the default keymap will
be backspace-as-delete instead of backspace-as-backspace.  I can't
really agree with this, but since it has "VT" in its name, it not
wholly unreasonable for it to behave this way.  8-).

In any case, the erase character should match the erase character in the
termcap entry for the device; if you change this, you must change your
termcap entry for the console as well so that it continues to match.

A much more interesting question is how you are dealing with 25 lines
when everything looks like s (24 line, hardcoded) VT100. 8-).


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703262314.QAA29104>