From: David K. <da...@ke...> - 2017-05-04 01:55:38
|
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 > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Astlinux-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > |