Eskimo North

Eskimo North Community - Register It's Free!
It is currently Thu May 23, 2013 10:08 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Backspace question
PostPosted: Thu Sep 28, 2006 2:04 pm 
Offline

Joined: Wed Aug 16, 2006 5:28 pm
Posts: 7
Location: Seattle, WA
Quck question on the Unix shell and the backspace key. This may have come up in the past but I certainly don't remember.

For a number of years now I have been using Terra Term under Windows to telnet into the shell and no problems. Simply set to VT100 emulation.

I've been using Linux more in the past couple of years and using Console on a KDE desktop I set up a session for VT100, telnet into the Unix shell and when I hit the backspace key on the command line it comes up with ^?. Backspace works fine in trn and pico or other editors but doesn't work on the command line.

Since I'm not a perfect typist every time I'm wondering if anyone has suggestions on how get the telnet session to work the same from linux as it does from windows.

(I believe I am using CSH though it has been so many years I don't remember and never really did learn the differences between different shells)

Thanks,
Dave


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 4:53 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 30, 2006 1:42 pm
Posts: 5
Location: Shoreline, Washington
It sounds like you're running linux on a PC. On PC's the backspace key automatically sends a ^?.

On Linux on a PC it will automatically set the ^? at boot for the backspace command. However on Sun OS (Eskimo's Shell server) the default backspace key sends a ^H. On the PC terminal emulator on windows it automatically detects what windows sends as a backspace command. On linux this detection does not happen because the normal xterm programs don't bother to check for that when telneting to a remote server. To solve this problem, after connecting to eskimo, type the following:

stty erase ^?

and for the charature, actually hit the backspace key to get it. Another way to fix this is to put that line in your .profile

I'm not sure if CSH uses the .profile or a csh defined profile file. It'll probably be a .csh_rc if it's not the .profile. These files can be found in your home directory on eskimo. Let us know how it goes. :)

_________________
-Carl
Eskimo North, Inc.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 12:23 pm 
Offline

Joined: Wed Aug 16, 2006 5:28 pm
Posts: 7
Location: Seattle, WA
Carl, Thanks for the explanation of what's going on as well as a fix. The command does work as advertised and I'll add it to .profile or .cshrc.

(I did have to reread to actually use the backspace to get the characters before it worked)

Dave


Top
 Profile  
 
 Post subject: Re: Backspace question
PostPosted: Thu Aug 09, 2007 11:16 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 30, 2006 4:25 am
Posts: 239
Location: Shoreline, WA
Just an initial note; telnet is not the idea way to connect for a number of reasons.

Most importantly, telnet sends text across the Internet unencrypted and thus is insecure. With respect to the backspace issue, it doesn't communicate terminal parameters across the connection.

A better alternative is to use an ssh client to connect. Ssh encrypts the session, including password, so that nothing you type is sent over the net plain-text. Ssh also forwards terminal session parameters so if you're on a PC, your window will automatically be configured with the correct backspace character.


Top
 Profile  
 
 Post subject: Re: Backspace question
PostPosted: Sat Oct 18, 2008 10:48 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 30, 2006 4:25 am
Posts: 239
Location: Shoreline, WA
Just another note regarding backspace...

^H is backspace
^? is delete

If a PC keyboard sends ^? when backspace is hit, the mapping is wrong. It should send that when delete is hit.
Most people when they use backspace actually intend for the delete function, that is they want not only to go back a space but to erase the character that was there.

In X-windows you can pretty much map anything to anything. The keyboard itself sends out a key code; there is map that determines what key code gets mapped to which ASCII value. Then termio used for tty control in Unix also allows you to map various ASCII values to various functions.

I wish I could say I knew how to change the mappings in X-windows but I don't. We had a complete set of X-windows documents when I worked at Qwest more than a decade ago and I played around with it a bit then but I've forgotten much of what I learned. However, the new CentOS distribution also includes X-windows documentation so I hope to re-learn some of it int eh future.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group