Thursday, May 24, 2012

Notes on Setting up Console Screen Size using 'stty'

Using PuTTY to open a console to the USB slave port on the Beaglebone (say COM20 on Windows 7), you specify to PuTTY the screen size you want, say 100 columns by 40 rows, before opening the console. Then, when logged in to the Beaglebone shell via the console, to make things like 'vi' and 'less' work right, you need to issue the stty commands:

$ stty columns 100
$ stty rows 40

Then screen-size sensitive programs like 'vi' and 'less' will work right. After resizing the screen console window (say, by dragging corners of the windows), the programs will not work correctly again until the stty commands are given with the new sizes.

No comments:

Post a Comment