Set correct terminal size to improve login over serial port experience
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
base-files (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
For people who use ipmiconsole or other serial port access to servers a great deal it would be helpful to set LINES and COLUMNS correctly on login. There are a number of ways to do this. I found a small (10k) C application at:
http://
which works nicely. It appears to be a simplified version of the resize command in xterm (which has too many dependencies for comfortable server usage). It seems quite old (2006) so there may be a better, newer version of this. Perhaps it would be better named tty-resize.
I added the following two lines to .profile which then invoke the resize command on login:
# size the terminal for login over serial
[[ $(tty) == /dev/ttyS* ]] & /usr/local/
I think remote serial usage is interesting for cloud and server farm use cases which are a big part of Ubuntu usage, so would like to improve experience in these cases across the board. This is a small part of that.
Hmm... that .profile causes this on SSH logins, so needs tweaking:
Last login: Sat Jan 5 10:49:02 2019 from 192.168.4.70
[1]+ Exit 1 [[ $(tty) == /dev/ttyS* ]]
john@xx:~$