Beside this do you this on the linux console? If not TERM=linux is nonsense as the TERM variable doe not change a terminal nor a termkinal emulator but only escribes the current terminal line ... beside this linux and xterm is compiled into the libncurses a long time now