Subject: Re: Creeping PCism...
To: Frederick Bruckman <fredb@immanent.net>
From: Johnny Billquist <bqt@update.uu.se>
List: netbsd-users
Date: 02/10/2004 01:30:38
On Mon, 9 Feb 2004, Frederick Bruckman wrote:

> On Tue, 10 Feb 2004, Johnny Billquist wrote:
>
> > On Mon, 9 Feb 2004, Frederick Bruckman wrote:
> >
> > > On Mon, 9 Feb 2004, Johnny Billquist wrote:
> > >
> > > > > echo "XTerm*ptyInitialErase: true" | xrdb -merge -
> > > > >
> > > > > or
> > > > >
> > > > > echo "*ptyInitialErase: true" | xrdb -merge -
> > > > >
> > > > > if your telnet starter's xterms have a different class name.
> > >
> > > > *ptyInitialErase is a resource for binding what character should be send
> > > > when pressing whatever key it figures. I already know what character I
> > > > want to send.
> > >
> > > No, that's not what it does. RTFM. What it does, is it turns off the
> > > setting of the erase character to the termcap "bs" entry, leaving it
> > > at the default, same as if you'd typed "stty erase ^?" before running
> > > telnet.
> >
> > Hmm. I'm reading the manual. And according to it, if you set
> > ptyInitialErase to true, xterm will *use* the ptys sense of the stty erase
> > value, while if false, it will set the ptys erase value to whatever is in
> > termcap.
> >
> > It finally sets the TERMCAP variable according to whatever it figured out.
> > So it will *not* set the cchar erase to DEL no matter what, unless I
> > totally misunderstand the manual page.
>
> The default erase character is already DEL, unless it's different in
> the controlling terminal (i.e, an xterm with the default
> configuration), so it doesn't have to *change* anything. If you did
> have to change it, you could create a custom termcap entry.

Huh? No, the default erase character is not DEL. That is what this whole
thing have been about!
The default erase character nowadays is ^H !!! Atleast that is what I am
observing. And that is what my problem have been the whole time. I thought
I had written this, but perhaps I've been bad at expressing myself. I'll
blame it on rethorics and my bad english in that case...

> > Perhaps you should RTFM then?
>
> Not only did I read the fine manual, but I actually tried the advice
> given to you, that you refuse to even try. YOU asked how to make the
> DEL character rubout the previous character; that question has been
> answered now, by two different people.

I really appreciate the effort, but so far it's been wrong.
My problem, and question, have been how to change the default, since it
nowadays is ^H, and that is still true, and I still don't know of a way to
fix it.

If you could just try what I do, you should see the same behaviour.
A simple test:

xterm -e telnet

When you get the xterm window, with the telnet prompt, send (no matter
how) a DEL char in that window, and observe how the telnet client echo ^?
Now send a backspace (just press ^H), and observe how your ^? is deleted.

Simple test. Once you have solved this, please report how you did it.
I still haven't found a solution to this.

Note that, if you start your xterm from a shell, make sure you haven't
changed anything from default in that shell. In my case, I start the xterm
from my window manager, which means I don't have a shell to get the
information from.

Hmm, I must admit that I haven't tried if stty would work when running my
.xinitrc, but that would be the one place I can think of that would
possibly have been of help. But unless I'm confused, I cannot do an stty
in my .xinitrc, since there is no tty.

Maybe if I put an "stty erase ^?" in /etc/rc.local, that would help? Hmmm,
getting ideas here... :-)

> > > It's a brute force hack, of course, making normal use of the
> > > workstation awkward, which is why I elaborated on how to get DEL vs.
> > > BS from the BackSpace key. The right thing to do, would be to tell the
> > > remote that you're in an xterm. ("tset xterm"?)
> >
> > You're assuming way too much. :-)
>
> I'm assuming nothing. I'm giving you information with the assumption
> that you'll actually try a few different things, and solve your own
> problem.

Yes, you are assuming things. :-)
"Telling the remote that I'm in an xterm ("tset xterm") is making quite a
few assumptions".

And I'm trying to actually solve a problem, and am pretty much aware of
how things work, and have also tried your suggestions, even though I
already knew they didn't work (which they actually didn't).

But I'm willing to keep an open mind, and a level conversation about this.
But I'm not going to stop using DEL, so any suggestions have better get
the Unix system starting to recognize my DEL. :-)

> > I'm connected to an RSX system. There is no tset. There is no xterm
> > terminal type in RSX. There is no way to rebind delete to react on
> > something else than DEL.
> >
> > I'm telling you, changing away from DEL is *not* an option. And previously
> > I never had problems, because NetBSD also used DEL for this. But recent
> > changes have switched over to use BS instead, and now I'm unhappy. I'm
> > looking for a way to get NetBSD back the way it was. Since noone have come
> > up with an answer to that one, I'll have to assume that it's not easily
> > done, and requires hacking the source.
>
> What change are you talking about? On my i386 kernel built Feb 7, the
> erase character for /dev/ttyE? is still unchanged from the defaults
> (i.e. ASCII DEL)?

On my system, the erase char is ^H unless I do an tty erase ^? explicitly.
If you have DEL by default, then it's time to figure out why I don't.

If I just start an xterm from my window manager, and look at the cchar
erase, it is ^H.
That's my problem. You're saying it is ^? for you. So we must have
something different between us.
Right now I cannot figure out what, but atleast we're getting somewhere.

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol