Operating System - HP-UX
1834166 Members
3362 Online
110064 Solutions
New Discussion

Can't erase the backspace !

 
SOLVED
Go to solution
John Clifford_1
Advisor

Can't erase the backspace !

This is probably more of a /etc/profile problem. I want to automatically erase the backspace for all users on the system. Normally one would type stty erase .
In the /etc/profile I put the line stty erase and then the sequence V . But when I logout and back in it doesn't seem to take.
When all is said and done..more will be said.........than done!
9 REPLIES 9
Ian Dennison_1
Honored Contributor

Re: Can't erase the backspace !

Are you doing something in the local ~/.profile that overrides /etc/profile? Perhaps a 'tset' or 'stty' series of commands?

Share and Enjoy! Ian

Building a dumber user
Deepak Extross
Honored Contributor

Re: Can't erase the backspace !

Does the user's .profile have a "stty sane"?
I just tested - after doing a "stty sane", backspace does not erase characters on my terminal.
Victor BERRIDGE
Honored Contributor

Re: Can't erase the backspace !

Hi,
On HP it should be:stty erase "^H"
Now, you havent mentionned what you are using (vt emulation, X like reflectionX ?) you might have to map the backspace in your emulator...

Just thoughts...
Victor
Sebastian_4
New Member

Re: Can't erase the backspace !

Hi, try in .profile:
stty erase "^?"

regards Seba
John Clifford_1
Advisor

Re: Can't erase the backspace !

OK echo $TERM
xterm

I had the line stty erase ^? in my profile
and the backspace key would work as expected.. i.e. deleteing the previous character. I commented out the stty line and logged out and in and then the backspace key would no longer work; I would get ^?^?^? evertime I hit it. I also notice that stty erase "^H" was in the /etc/profile but obviously this hasn't had an effect.

baffled
When all is said and done..more will be said.........than done!
Victor BERRIDGE
Honored Contributor

Re: Can't erase the backspace !

Have you tried to enter something, like kjhswgkjhsfwf
Then do a and see if it erases?
Sebastian_4
New Member

Re: Can't erase the backspace !

Hi again
do
vi .profile
and insert line

stty erase \backspace

and press enter it will change \backspace to right code
hope it help
Peter Kloetgen
Esteemed Contributor

Re: Can't erase the backspace !

Hi John,

the error you describe sounds as if you use RefletionX as emulator. If so, you can simply use the style manager "keyboard" to change behaviour with a mouse click.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Alex Glennie
Honored Contributor
Solution

Re: Can't erase the backspace !

NB /etc/profile has test only for VUE($VUE) not CDE($DT) for sty settings.

If you don't want to set erase in .profile you could use resources :

Create $HOME/.Xdefautls and put the following line in it:

*ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z

for system wide settings use files in /usr/dt/config/C probably sys.resources.

Also bear in mind dtterm does not automatically reference a users .profile ... dtterm -ls will though.