Click to See Complete Forum and Search --> : Konsole backspace problem


Bog
01-23-2004, 04:39 PM
When I'm using Konsole and I ssh to my webserver, remotely, and then run vi, the backspace character writes "^?" instead of deleting the last thing I typed. It's probably expecting control-h. How do I change that in KDE? From windows, with putty, it's easy to do, and works fine.

I actually searched around a lot for this because I figured it must happen to everyone, but this is the closest thing to an answer that I could find:

http://tinyurl.com/3xjq8

Where is my keytab file? Or is there something in the konsole settings i'm not seeing...

nafsnipe685
01-23-2004, 06:22 PM
kinda sounds like a keboard error to me, is there any other key on any other part of the system that messes up?

johnsc
01-23-2004, 07:11 PM
stty erase ^H

You can write this in your .profile file in your home directory so that you wont have to type it every time you log in to your remote server.

Bog
01-23-2004, 10:23 PM
Originally posted by johnsc
stty erase ^H


Unless I did it wrong, it didn't work. To try it, I did:

stty erase ^H

in Konsole, and then I did:

ssh nameof.theserver.com

and then after I logged in I did :

vi asdfwrg

and when I enter text into the file and press backspace, I get "^?" still.

Did I do it wrong? This works ok when I use putty on my windows machine, going to the same server and using vi. Here is stty -a:

[bog@localhost apache2]$ stty -a
speed 38400 baud; rows 18; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

johnsc
01-24-2004, 01:36 AM
I never use the backspace key in the vi editor, so I wouldnt know how to fix this problem. But vi editor has its own commands for deleting texts or moving the cursor, i dont think the backspace key will do these in the vi editor.

I recently installed vim editor for my remote school unix account, and I am using the backspace key now to delete the text and move around, so you might want to look into vim if you are looking to use the backspace key to delete text or move around.

If your backspace key is giving you something like ^? in the remote terminal, you can type 'stty erase ^H' in the prompt after you ssh into your remote server. Or just add that line to your .profile file in the home directory.

Bog
01-24-2004, 03:40 AM
Originally posted by johnsc
I never use the backspace key in the vi editor, so I wouldnt know how to fix this problem. But vi editor has its own commands for deleting texts or moving the cursor, i dont think the backspace key will do these in the vi editor.

If your backspace key is giving you something like ^? in the remote terminal, you can type 'stty erase ^H' in the prompt after you ssh into your remote server. Or just add that line to your .profile file in the home directory.

Yes, the backspace key is supposed to backspace in the vi editor when it's in input mode. Like I said, it works fine when I use putty on my windows machine, connecting to the same server, using the same vi on that server.

I just tried to do stty erase ^H after sshing to the remote server, but I still get ^? when I try to backspace in vi.

does anyone else know how to fix this?