Command wraps around same line after 80 characters

minicomserial-consoleterminaltty

I have an annoying problem with minicom connected to a serial console to a Yocto Linux machine.

The command that I enter wraps around on the same line after 80th character. This becomes very inconvenient to work with. Everything I entered at the beginning of the line gets overwritten by the last chars of that line.

A SSH connection to the same machine works just fine. After 80th characters ssh go to the next line.

This is the stty setting:

stty -a
speed 115200 baud; rows 24; columns 80; 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

The -w option of minicom has no effect. Still the same behavior

minicom -w

The resize command is not available on that machine. To which package does it belong? Maybe I can install it.

How can I fix that behavior?

Best Answer

This worked for me. The target shell needs to be set to check window size and to be set to the correct size of your console gui. After connecting via serial with either putty or minicom:

shopt -s checkwinsize
resize
Related Question