Support Center

Setting the Window Size and Terminal Type

When connected to another machine via SSH or Telnet, the current screen size, terminal type, and other environment variables are automatically transmitted to the remote device using an out-of-band communications channel. This channel does not exist when using a serial port, however. As a result, you will need to configure these manually on the remote machine for the screen to display correctly.

If the current size of the terminal window gets out of sync with the remote device you may experience visual artifacts and the scroll back buffer may not work correctly.

Many devices assume 80x24 and a terminal type of VT100, but if you're connected to a Linux (or other Unix) based machine, you can make use of larger window sizes and use more advanced terminal features.

Terminal Type

To set the terminal type, you will need to set the "TERM" environment variable. We recommend setting TERM to "xterm-256color" if this is supported by your device. In bash, you would type the following:

export TERM=xterm-256color

Window Size

Most Unix machines support the "stty" command to set the current screen size used for formatting output from programs. If the current window size is 132x48, for example, you would type:

stty cols 132 rows 48

After doing this, screen-based programs such as vi and emacs will now fill the screen.

Serial 1.1.7 and later provide a "Send Window Size"  + y shortcut that automatically sends the appropriate command to adjust the window size to the remote device.

We've also put together a script that can be run on some types of target device that will automatically query the terminal for the current window size and set it accordingly. See Window Size Sync Script for more.