-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
termsize: without python #10
Comments
That works well, too. Thanks. |
Fails on Pi OS Bookwarn with the following message... |
The script only works with |
That is what is odd... I am using BASH, on Pi OS. I was able to get around it by embedding the following in my .bashrc script file. Still testing this it will force the (agetty) based serial console (say opened with putty) to the desired rows and columns but is not perfect, if you happen to have the putty (COM) session smaller than 60 x 200 it will resize the terminal window and everything seems to honor it... but if serial console is bigger than 60 x 200 it does not seem to shrink the (putty) terminal window (which I expected). I can live with the issue, since typically putty defaults to 24x80 on serial consoles.
The big headache is that agetty just does not seem to have any easy way to be changed, looking at the C source code. It defaults to 24x80 but only it the agetty executable does not get a valid terminal size returned
Would be nice if agetty could be changed to honor say a configuration file in say /etc/default, or such that would allow a default rows and columns values to be set and consistently honored. |
(this is not really an issue)
First, thanks for the blogpost about termsize, it got me started on some yak shaving I didn't intend to do today... :-)
While reading your post I figured there should be a way to do it without python at all.
Here's a way to do it, I thought you might be interested.
Also, busybox has
resize(1)
. (which I discovered after writing the above...)https://git.busybox.net/busybox/tree/console-tools/resize.c#n85
The text was updated successfully, but these errors were encountered: