From: Lonnie A. <li...@lo...> - 2017-05-04 02:19:22
|
As a tip, you can manually type "resize" after you login on a serial console to do the same. Due to the lack of responses we probably should keep "/dev/ttyS*" pure and no fancy stuff. A person can always enable "USB TTY Serial Login" https://doc.astlinux-project.org/userdoc:usbtty_serial_login even if there is a serial port. for those cases when an non-network, out-of-band login is needed. The "resize" is automatic there. Lonnie On May 3, 2017, at 8:55 PM, David Kerr <Da...@Ke...> wrote: > So I rarely have to resort to serial terminal use... usually only when I screw up. However on those rare occasions that I do have to go serial it would be very very nice to be able to increase the screen size. In particular 24x80 does restrict how many e.g. syslog messages are visible at once. As I recall whatever terminal s/w I use doesn't have a scroll buffer I can use to go back to see messages that already scrolled off. > > David > > On Mon, May 1, 2017 at 8:12 PM, Lonnie Abelbeck <li...@lo...> wrote: > Hi Devs, > > When adding the new "USB TTY Serial Login" feature, one thing we did in the /etc/profile is to call the "resize" command to query the terminal to automatically determine the LINES and COLUMNS and update "stty -a". > -- > # Set LINES and COLUMNS for USB TTY serial devices > if [ -x /usr/bin/resize ]; then > case $(tty) in > /dev/ttyUSB*) resize >/dev/null ;; > esac > fi > -- > This works very nicely, and makes ncurses apps work as expected for an arbitrary terminal window size, rather than assuming the default 24x80. > > Simple question, should we do the same for "/dev/ttyS*" for standard serial consoles ? > > You may wonder how "resize" works, a vt100 terminal allows an escape sequence to "Query Cursor Position" after moving to ROW;COLUMN position 999;999 pinned at lower-right, lastly restore cursor back to where it started. "resize" reads the data sent back indicating the size of the terminal window. > > So clearly this will only work if you are emulating a vt100 or some later ANSI flavor, but chances are you do. But what if you don't, then you might see a few goofy escape sequences shown and the "resize" command waits for up to 3 seconds to get a reply before giving-up and continuing as normal. > > I'll gladly add "/dev/ttyS*" if people like the idea, but will leave it as is until there is demand for the change. > > Lonnie |