Connecting to Linux with terminal emulators

Introduction

Connecting to Linux over the network from a Windows host using a terminal emulator often results in annoying keyboard and/screen issues. You'll have some tips & tricks about how to solve some of them.

If all else fails, or you'd really rather use Windows-based editors, an alternative to terminal emulators is accessing files either through SSH (WinSCP) or SMB/CIFS (Samba).

Issues

Keyboard

Navigation

Screen

Causes

Investigating

Input

echo $TERM

cat -v

stty -a

stty erase '^H' (add to .profile)

^H represent BS whereas ^? represents DEL

Output

(Ubuntu) # locale

Font used in terminal emulator

Terminal Emulators

Putty

Only supports xterm

Putty Connection Manager

By default, hotkeys such as CTRL-U to duplicate the current window, are disabled: Tools > Options > Hotkeys

Drawback: Keys used by PCM may conflict with applications (eg. F3 is also used by Midnight Commander).

SecureCRT

Options > Session Options > Terminal > Appearance: Character Encoding = Default -> UTF-8

Once a connection is open in one tab, File > Clone to open more without being prompted with login/password.

Tools > Keymap Editor: If you want to map eg. CTRL+Home to CTRL+k,u (to jump to the first line of the document in Joe), map "Ctrl-Extended-VK_HOME" to "013\u" (\013 is octal for CTRL+k). See ASCII Control Codes.

Why am I seeing strange characters on the screen when I log onto RedHat, particularly when I look at man pages?

How do get my color scheme settings to work?

Kitty

"KiTTY is a fork from version 0.60 of PuTTY [...]. KiTTY has all the features from the original software, and adds many others".

To tell Kitty to send ^ku and ^kv when you type CTRL+Home and CTRL-End, edit %APPDATA%/KiTTY/kitty.ini thusly:

[Shortcuts]
{CONTROL}{HOME}=\x0Bu
{CONTROL}{END}=\x0Bv

To use MidnightCommander's F7 to Search, add this to Kitty's ini file:

print={SHIFT}{F7}
printall={CONTROL}{SHIFT}{F7}

In addition, you should add the following lines to kitti.ini, so that Kitty can update the Putty section in the Registry:

[PuTTY]
keys=load

Applications

Joe

Nano

"Meta key" = Either ALT or ESC. For instance, in Nano, on a French keyboard layout:

Alternatively, you can customize your terminal emulator to send those keys when typing CTRL-Home/End instead.

Ne

http://ne.dsi.unimi.it/

Vi(m)

If you get the familar ABCD's when using the arrow keys, try this:

  1. readlink -f $(which vi), to check whether Ubuntu is actually pointing to vim.tiny, which "uses the /etc/vim/vimrc.tiny file instead of the /etc/vim/vimrc file. The vimrc file sets nocompatible mode, while vimrc.tiny does not."
  2. apt-get install vim

Midnight Commander

If funny characters and F10 doesn't work, try ESC 0 (zero) to close.

If connected with vt100, disconnect, use xterm, and try again.

Also check what character set the Linux server uses (eg. UTF-8), and make sure the terminal emulator expects the same

Glossary

termcap

terminfo

readling

curses

stty

Resources