Re: SSH with PuTTY - Home/End keys don't work



Nikos Chantziaras wrote:
When I login using SSH to an openSUSE 10.3 machine from another Unix
machine with the 'ssh' client, all is fine; the Home and End keys work.
However, when I login from a Windows machine using the PuTTY client,
those keys won't work. I tried every possible configuration in PuTTY to
no avail.

On other machines I login to with PuTTY (CentOS, Gentoo, Solaris), they
work. Only the openSUSE 10.3 machines have this problem.

Any tips?


You need a terminfo definition on the Linux side that works well
with PuTTY.

Install ncurses-devel on the Linux box (so you have a tic command)
and then copy the file at the end into a filename like scoansi-dm-cjc.ti
Use tic -x scoansi-dm-cjc.ti to compile it into your terminfo database
(as root of course).

Tell PuTTY you want to use SCO for the terminal
function type. And then set your TERM environment variable
in your shell on Linux to TERM=scoansi-dm-cjc

Should give you almost every key sequence possible. This is overkill
for what you're asking for... but hey... just in case...

Here are some PuTTY config hints:
If mentioned below, assume the state is to be set to "on"
or "selected" (otherwise assume "off" or not selected).

Session (top level)
Close window on exit:
Only on clean exit

Session/Logging
Session logging:
Logging turned off completely

Log file name:
putty.log

What to do if log file already exists:
Ask the user every time

Terminal (top level)
Auto wrap mode initially on

Answerback to ^E:
PuTTY

Local echo:
Auto

Local line editing:
Auto

Terminal/Keyboard
The Backspace key
Control-H

The Home and End keys
Standard

The Function keys and keypad
SCO

Initial state of cursor keys
Normal

Initial state of numeric keypad
Normal

Control-Alt is different from AltGr

Terminal/Bell
Action to happen when a bell occurs:
Play Windows Default Sound

Taskbar/caption indication on bell:
Disabled

Bell is temporarily disabled when over-used

Over-use means this many bells.... 5
...in this many seconds 2

The bell is re-enabled after a few seconds of silence.
Seconds of silence required 5

Window (top level)
Rows Columns
25 80

Change font size only when maximized

Lines of scrollback 200

Display scrollbar

Reset scrollback on display activity

Window/Appearance
Cursor apperance:
Block

Font: Courier New, 10-point

Window title:
208.14.24.163-PuTTY

Window/Behaviour
Warn before closing window
Window closes on Alt-f4
Full Screen on Alt-Enter

Window/Translation
Received data assumed to be in which character set:
ISO-8859-1:1998 (Latin-1, West Europe)

Handling of line drawing characters:
Unicode mode

Window/Selection
Action of mouse buttons:
Windows (Right pastes, Middle extends)
Shift overrides application's use of mouse

Default selection mode (Alt+drag does the other one)
Normal

Windows/Colours
Bolded text is a different colour

Connection (top level)
Return key sends telnet New Line instead of ^M

Seconds between keepalives (0 to turn off) 60


Here is the scoansi-dm-cjc.ti file (cut and paste into
a file and tic -x the file on the Linux host):

# Reconstructed via infocmp from file: /usr/share/terminfo/s/scoansi-dm-cjc
scoansi-dm-cjc|SCO Extended ANSI standard crt,
bce, eo, km, xon,
colors#8, cols#80, it#8, lines#25, pairs#64, kdelay#2,

acsc=0[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`ja0fxgqh2jYk?lZm@nEqDtCu4vAwBx3~y,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[=14;12C,
clear=\E[2J\E[H, cnorm=\E[=10;12C, cub1=\E[D, cud1=\E[B,
cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
cvvis=\E[=0;12C, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
ed=\E[m\E[J, el=\E[m\E[K, home=\E[H, ht=^I, ich1=\E[@,
il=\E[%p1%dL, il1=\E[L, ind=\E[S, indn=\E[%p1%dS,
invis=\E[8m, kbeg=\E[E, kbs=^H, kcub1=\E[D, kcud1=\E[B,
kcuf1=\E[C, kcuu1=\E[A, kdch1=\177, kend=\E[F, kf1=\E[M,
kf10=\E[V, kf11=\E[W, kf12=\E[X, kf13=\E[Y, kf14=\E[Z,
kf15=\E[a, kf16=\E[b, kf17=\E[c, kf18=\E[d, kf19=\E[e,
kf2=\E[N, kf20=\E[f, kf21=\E[g, kf22=\E[h, kf23=\E[i,
kf24=\E[j, kf25=\E[k, kf26=\E[l, kf27=\E[m, kf28=\E[n,
kf29=\E[o, kf3=\E[O, kf30=\E[p, kf31=\E[q, kf32=\E[r,
kf33=\E[s, kf34=\E[t, kf35=\E[u, kf36=\E[v, kf37=\E[w,
kf38=\E[x, kf39=\E[y, kf4=\E[P, kf40=\E[z, kf41=\E[@,
kf42=\E[[, kf43=\E[\\, kf44=\E[], kf45=\E[\^, kf46=\E[_,
kf47=\E[`, kf48=\E[{, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T,
kf9=\E[U, khome=\E[H, kich1=\E[L, knp=\E[G, kpp=\E[I,
mc4=\E[4i, mc5=\E[5i, op=\E[37;40m, rev=\E[7m, ri=\E[T,
rin=\E[%p1%dT, rmacs=\E[10m, rmam=\E[?7l, rmso=\E[m,
rmul=\E[m, sgr0=\E[0;10m, smacs=\E[12m, smam=\E[?7h,
smso=\E[7m, smul=\E[4m, kAlt=^A,
.