waldo wrote:
I have my window size for PuTTY set to 120x60 and yet still only get an 80x20 (I think, I'd have to count columns and rows to be sure) window. I've noticed the same size restriction for the LISH console in a terminal window on Ubuntu.
Have you tried telling the system once you have the shell about your new size? It seems to work fine for me although since the serial port is essentially always connected it doesn't reset on each connection.
As Jed's response mentions, the console is essentially a raw serial port, always connected to the host LISH process, or at least to its screen instance, which while the port itself has no natural size, the "terminal" on the other end does - the terminal in this case is your client. So you've got this extra fairly low level interface in between your putty client and the system (unlike a direct ssh connection).
For example, if I open up a 180x40 terminal window (I'm on OSX at the moment, so Terminal is my emulator rather than putty, but it shouldn't matter), and ssh to LISH for my Linode (Ubuntu 8.04) and then login, initially it continues to use whatever the serial port was last set to (defaulting on bootup to 80x24 (or 25)). But if I tell it the right size it adjusts properly, e.g.:
Code:
> stty cols 180 rows 40
> stty -a
speed 38400 baud; rows 40; columns 180; line = 0;
(...)
and after that, that console port is 180x40 and tools should work fine, from simple wrapping of "ls" to full-screen stuff like vi/emacs. As a serial port setting, it also appears to retain itself across connections, so you'd have to adjust again if you came in with a different sized window.
It's actually possible with some terminal emulation types to interrogate the terminal/emulator - the resize utility can do this with xterm, though its use has become much less common over time with increased automatic detection of changes (sigwinch & terminal size ioctls), which tools like ssh can propagate across network connections. But even older vt100 emulation has escape sequences that can determine the size if you have a utility/code to perform query.
I think Putty may actually support the xterm escape sequence (at least my copy has an option to disable it), so you might be able to use resize if you have it installed. On Debian/Ubuntu it's part of packages like xterm so if you don't have much in the way of X client support you get a bunch of unnecessary stuff just to get resize, so it might not be worth it.
Another workaround would be to check your current tty in a login script, setting an appropriate default size when coming in on a real tty (like /dev/tty1) versus a network connection which generally gets a pty (like /dev/pts/0).
-- David