Setting up proper terminal size for serial connection to an embedded device

consoleWhen you work over serial line on an embedded device usually the terminal size it set to 80×25.

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).

This entry was posted in en. Bookmark the permalink.