I have the lines
XTerm*loginShell: true
XTerm*eightBitInput: true
in my .Xdefaults file together with set +o emacs-usemeta in my .profile.
Those bind statements are in my .kshrc, set differently for each terminal:
if [ -o interactive ]; then
case "$TERM" in
vt220)
bind '^[[3'=prefix-2 # DEL
bind '^[[3~'=delete-char-forward # DEL
;;
wsvt25)
bind '^[[3'=prefix-2 # DEL
bind '^[[3~'=delete-char-forward # DEL
;;
xterm*)
export TERM=xterm-color # force color
bind '^XH'=beginning-of-line # Pos1
bind '^XF'=end-of-line # End
;;
nxterm)
bind '^XH'=beginning-of-line # Pos1
bind '^XF'=end-of-line # End
;;
*) ;;
esac
fi
HTH,
Markus