Operating System - HP-UX
1753774 Members
7059 Online
108799 Solutions
New Discussion юеВ

Backspace at login doesnt work despite of ttyconf

 
SOLVED
Go to solution
Kavitha_K
New Member

Backspace at login doesnt work despite of ttyconf

Hi,

On a 11.31 ia64; I am seeing this same issue of backspace causing garbled login credentials.
I used following to get backspace to work even at login, as suggested in some previous threads;
stty erase "^H" kill "^U" < /dev/ttyconf

But, doesn't ^H translate to shift+backspace ?

So, on the same lines, I tried doing;
stty erase "^?" kill "^U" < /dev/ttyconf

It succeeded in setting;
stty < /dev/ttyconf
erase = DEL; kill = ^U;
swtch ;

But, this doesn't resolve the issue of garbled input at login if I use backspace now!

If its of any help, my TERM type is xterm.
Any clue?
10 REPLIES 10
Hein van den Heuvel
Honored Contributor

Re: Backspace at login doesnt work despite of ttyconf


>> suggested in some previous threads;

Which one? This one seemed best...

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1384334

( found back with google:+backspace +login +site:itrc.hp.com )


>> But, doesn't ^H translate to shift+backspace ?

The control key brings all characters into the 'low range', below a 'space' = 32 = 0x20 in value.
It clears the top 3 bits in a character.
You could see that as subtracting 32.

There is no additional modification for uppercase/lowercase.

There couldn't be, because then the value would would come back into the normal character code range.
"A" = 65
Minus 32 that would be 33 = "!"


Is that part clear?
Regards,
Hein.
Steven Schweda
Honored Contributor

Re: Backspace at login doesnt work despite of ttyconf

> If its of any help, my TERM type is xterm.

But what is your actual terminal (or
emulator), and what does it send when you hit
your backspace key? If you try Ctrl/H
instead of using your backspace key, that
last question should matter less.
Kavitha_K
New Member

Re: Backspace at login doesnt work despite of ttyconf

Hein,

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1384334

( found back with google:+backspace +login +site:itrc.hp.com )
-- Yes. I referred to this thread as well.

>> But, doesn't ^H translate to shift+backspace ?

The control key brings ....33 = "!"
Is that part clear?

-- I agree to this explanation. Thank you. My query was that with erase=^H ; I need to use the keys ctrl+H on the keyboard for erasing.
But if I would want to use the 'backspace key' for erasing, I do the setting with ;

stty erase "^?" kill "^U" < /dev/ttyconf (as I said above).

It doesn't work i.e. login doesn't happen successfully. Any idea why so? Could there be a restriction on what values 'erase' can have?
Tingli
Esteemed Contributor

Re: Backspace at login doesnt work despite of ttyconf

What kind terminal emulation you use to connect to system?
Laurent Menase
Honored Contributor
Solution

Re: Backspace at login doesnt work despite of ttyconf

you should check the del char with "xd -xc"
and "stty -a to check that intr is not also mapped to the same char as erase.

Aneesh Mohan
Honored Contributor

Re: Backspace at login doesnt work despite of ttyconf

Hi Kavitha,

Try this.

stty kill '^X' intr '^C' werase '^W'

Aneesh
Kavitha_K
New Member

Re: Backspace at login doesnt work despite of ttyconf

Hi,
I checked, the current terminal settings. It was;
stty -a < /dev/ttyconf
min = 4; time = 0;
intr = DEL; quit = ^\; erase = DEL; kill = @
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext

As advised, I verified, the intr and erase were the same characters. So I did this;
stty kill '^X' intr '^C' werase '^W' erase '^?'
stty -a < /dev/ttyconf
min = 4; time = 0;
intr = ^C; quit = ^\; erase = DEL; kill = ^X
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase = ^W; lnext

and it WORKS now! Thank you so much everyone for your assistance.
Bill Hassell
Honored Contributor

Re: Backspace at login doesnt work despite of ttyconf

> stty erase "^H" kill "^U" < /dev/ttyconf
> But, doesn't ^H translate to shift+backspace ?

No, the stty interpretation for "^H" is control-H which on standard ASCII keyboards is the backspace key.

> So, on the same lines, I tried doing;
stty erase "^?" kill "^U" < /dev/ttyconf

And control-? is the delete key (hence the word DEL in stty output).

> It succeeded in setting;
> stty < /dev/ttyconf
> erase = DEL; kill = ^U;

I'm not sure why you want to use the DEL key for a backspace -- that is more common for DEC environments. Have you mapped the Xwindow backspace key to the DEL key?


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Backspace at login doesnt work despite of ttyconf

>Bill: I'm not sure why you want to use the DEL key for a backspace - that is more common for DEC environments. Have you mapped the Xwindow backspace key to the DEL key?

I think windows uses DEL? I have problems using keyboards configured by other users.

Also some emulators allow you to configure whether backspace does a control-H or DEL.