2

Over the years I've had various keymap issues in UNIX screen through SSH, and I assume others have as well. My question has two parts:

  • When I SSH into my Ubuntu Dapper server (I know, I'm moving to Lenny post-haste:) from my OSX Macbook, the delete key doesn't map to backspace, but to delete (which is not the correct behavior, Apple's delete is really backspace). Has anyone else encountered this behavior? How to resolve it?
  • I think I ought to know more about how keymaps work on the UNIX console in general. Where can I find general information on how to resolve inter-platform keymap issues with SSH?

3 Answers 3

1
  1. Check in Terminal -> Settings -> Advanced and make sure that your delete key is sending something sane. Toggle this and see if it helps.
  2. See what $TERM is when you ssh into your server. I get xterm-color when I ssh in to my Debian box, and screen when I'm in screen.
0

Ubuntu Linux, and UNIX systems in general, use a program called stty to configure the keyboard. Run the command "man stty" to read the manual page for stty. By the way, stty is in section 1 of the manual, so UNIX geeks tend to call this program "stty(1)".

The usual way to customize keyboards is to edit the startup file for your shell. If you use the bash shell, this file is .bashrc. You can test a shell variable called "TERM" which identifies what kind of terminal or terminal emulator you are using. If you have no experience at editing .bashrc files, you can read about the syntax in the bash manual page: "man bash"

As far as I know, the actual key code sent by the Apple terminal emulator probably is ASCII DEL; it's up to your stty settings to turn that into backspace-erase in the shell.

Good luck!

0

You need to make yourself an .inputrc file in your home directory. Check out: http://www.macosxhints.com/article.php?story=20050525040921189.

My ~/.inputrc looks like this (I especially like the case-insensitive auto complete):

# Make fwd delete key do something useful
"\e[3~": delete-char

# Make ctrl-left and ctrl-right skip words
"\e[5C": forward-word
"\e[5D": backward-word

# ignore case in tab-autocomplete
set completion-ignore-case On
1
  • 1
    How about this gem: set show-all-if-ambiguous on set completion-query-items 150 If there are less than 150 possible tab completions, show them all on the first tab. =) Oct 26, 2009 at 4:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .