Setting up proper terminal size for serial connection to an embedded device
Thu, 12 Nov 2015 11:29:13 +0000
When you work over serial line on an embedded device usually the terminal size it set to 80x25.
There's an easy way, however, to setup your real terminal size, just add the following line to your profile script (~/.profile):
resize > /tmp/resize . /tmp/resize
resize command detects real terminal size and sets COLUMNS and ROWS parameters accordingly:
# resize COLUMNS=159;LINES=52;export COLUMNS LINES;
One just need to execute the output as sh commands (using source "." command).