You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a bit vague, and I'll rename it when we figure it out better. There are a set of probably related issues that came up when @jmpesp was testing and demoing the streaming serial console.
Resize on window resize doesn't fully work. Once you load the serial console with a given window size, resizing the window does resize the terminal window displaying the stream, but the source doesn't seem to be aware of that. Now that I think about it that kind of makes sense? Once the text comes into the buffer in propolis from the VM itself, it's there, it's not gonna change width. Since multiple clients can connect to it, doesn't make sense for it to be dynamic. Most likely it is assuming a particular width and we should also assume that width. That means we may not need the fit addon at all. Instead we can just fix a particular width like 80 characters, and if the window gets smaller than that we'll have to scroll horizontally.
Need to figure out what to do about height as well, of course.
The starting tasks here are
Check hunch that propolis is assuming/forcing 80 character width on stream
Figure out how to get some realistic example data into the mock serial console so we can do dev easily
most OSes (including Linux) are going to assume by default that any serial console is 80 columns.
normally when you resize your typical graphical terminal emulator, a SIGWINCH signal informs the processes within that the shape of the world has changed https://www.ietf.org/rfc/rfc1073.txt -- but obviously we can't just send a guest unix signals down a uart connection (even if such a thing were possible, it might not be a unix on the other end!)
we may be able to blast some ANSI escape sequences back and forth (i.e. by running resize (typically found in the xterm (real (not javascript)) package) in the guest) so the guest can determine what the new window size should be, but live-resizing while an arbitrary program is running will get sticky.
The problem with using the full screen size is that there can be two people connected at the same time. Which screen size do you use? Most likely we will have to keep clamping.
Activity
lifning commentedon Apr 10, 2023
most OSes (including Linux) are going to assume by default that any serial console is 80 columns.
normally when you resize your typical graphical terminal emulator, a
SIGWINCHsignal informs the processes within that the shape of the world has changed https://www.ietf.org/rfc/rfc1073.txt -- but obviously we can't just send a guest unix signals down a uart connection (even if such a thing were possible, it might not be a unix on the other end!)we may be able to blast some ANSI escape sequences back and forth (i.e. by running
resize(typically found in the xterm (real (not javascript)) package) in the guest) so the guest can determine what the new window size should be, but live-resizing while an arbitrary program is running will get sticky.david-crespo commentedon Apr 10, 2023
Yeah, I think it's a lot safer and easier to assume 80 and not get fancy.
[-]Serial console: resize doesn't quite work[/-][+]Serial console width and resize issues[/+]david-crespo commentedon May 18, 2023
@mkeeter:
#1502
The problem with using the full screen size is that there can be two people connected at the same time. Which screen size do you use? Most likely we will have to keep clamping.
david-crespo commentedon Jun 7, 2024
Not sure if this is the same issue, will spin out a separate one if not. Thanks @taspelund for reporting.
2024-06-07-serial-console-super-wide.mp4
david-crespo commentedon Jun 7, 2024
The width problem in my comment is fixed by #2272. I don't think the original issue is fixed because it has to do with our app logic.