I have problem with my console drawing lines. The problem is when I connect through ssh to server everything draws ok. But when I use up arrow key to show last used commands it often leaves few characters after $ sign:
user@host:~$ cd /var/www_vhosts/
user@host:/var/www_vhosts$ ls -la instalator-paczek/
razem 16
drwxrwxr-x 3 root root 4096 02-20 10:48 .
drwxr-xr-x 13 root root 4096 05-17 11:11 ..
-rwxrw-r-- 1 root developers 3380 05-29 11:03 instalator-paczek.sh
drwxrwxr-x 2 user developers 4096 05-29 11:03 logi
user@host:/var/www_vhosts$ cd instalator-paczek/
user@host:/var/www_vhosts/instalator-paczek$ nano instalator-paczek.sh
user@host:/var/www_vhosts/instalator-paczek$ cp -r inst
user@host:/var/www_vhosts/instalator-paczek$ nano /etc/issue
user@host:/var/www_vhosts/instalator-paczek$ uname
Linux
user@host:/var/www_vhosts/instalator-paczek$ uname -a
Linux host 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
user@host:/var/www_vhosts/instalator-paczek$ cat /etc/issue
Debian GNU/Linux 6.0 \n \l
# here I use up arrow key to display last used commands and everything is ok until it show last: "cp -r in..." command
# "cp -r inst" is shown and next last used commands are shown after those 10 characters. I displays them like:
# $ cp -r instls -la
# $ cp -r instcd directory
# etc.
# I tried using backspace but it clear characters just until "cp -r inst", not even one more
# prompt is shown correctly only after i press enter or ^C
user@host:/var/www_vhosts/instalator-paczek$ cp -r instnano /etc/issue
user@host:/var/www_vhosts/instalator-paczek$ ls
instalator-paczek.sh logi
What is even more irritating is what happens when I type more characters than console width. Cursor somehow goes back to the beginning of line and overwrites prompt:
/d/asd/as/d/asd/asd/as/d/asd/asdww_vhosts/instalator-paczek$ ls -la asdkasdasdasd/asdasdasd/asdasdasdasdasdas/dasdsdaas/d/asd/as/d/asd/as
I can't use any long commands because it overwrites beginning and I can't see if I typed everything correctly. Long command when pasted inside console works even if display is corrupted. It's like only display is corrupted but command itself is ok.
I have ubuntu 12.10 and use Konsole as console application. On server there is Debian GNU Linux 6.0 and xterm.
user@host:/var/www_vhosts/instalator-paczek$ echo $TERM
xterm
It only happens with this server other servers I connect works good with Konsole.
How to fix this?
EDIT
Is this possible that those errors are occurring because there is no xterm installed on server and there is no resize command?
user@host:~$ stty -a
speed 38400 baud; rows 57; columns 151; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
user@host:~$ stty -a
speed 38400 baud; rows 57; columns 172; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
It seems like resizing console window also changes stty.
EDIT2
I've installed xterm package on server. I've logged out and log in again but problem is still the same. Should I restart server after installing xterm or something?
EDIT3
Solution here
xterm. I updated my questionDebian GNU Linux 6.0, I've updated my question. Please see my edit.libdrm-intel1 libdrm-radeon1 libdrm2 libgl1-mesa-dri libgl1-mesa-glx libice6 libsm6 libutempter0 libxaw7 libxcb-atom1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxmu6 libxpm4 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 x11-utils xbitmaps. Is there other way? Maybe use something that is already installed, other than xterm. I also saw that resizing console windows also changessttysettings correctly. See my edit.