Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: LISH Console size?
PostPosted: Tue Jun 09, 2009 4:51 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Didn't know exactly which forum to post.

Does anyone know if it's possible to change the LISH console size?

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.

Makes for reading some text files while configuring everything a little hard.


Top
   
 Post subject: Re: LISH Console size?
PostPosted: Tue Jun 09, 2009 4:58 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
waldo wrote:
Does anyone know if it's possible to change the LISH console size?

This is a limitation of how we communicate with your Linode. The resize requests are correctly processed by our host server, but there is no way to resize hvc0 -- think of it as a serial console. You can't resize a serial console either.

It annoys me too, and I'm studying it to see if there's a workaround.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Tue Jun 09, 2009 5:20 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Oh well
I'll live
with it
for now
:D


Top
   
 Post subject: Re: LISH Console size?
PostPosted: Tue Jun 09, 2009 6:47 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
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


Top
   
 Post subject: Re: LISH Console size?
PostPosted: Tue Jun 09, 2009 11:29 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
db3l wrote:
Code:
> stty cols 180 rows 40
> stty -a
speed 38400 baud; rows 40; columns 180; line = 0;
(...)

That's pretty solid. I forgot all about stty. Now, as for passing SIGWINCH...

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject: Re: LISH Console size?
PostPosted: Wed Jun 10, 2009 2:52 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
jed wrote:
That's pretty solid. I forgot all about stty. Now, as for passing SIGWINCH...

Heh, yeah, with today's interfaces it's easy to forget all the support that exists for terminals over serial lines.

I don't think you've got much room to work with the serial console. Unless you're going to require the VPS itself to run a custom getty or equivalent on the console port that will parse special commands from LISH to identify the terminal size. Even if there's an OOB way to generate signals from xen to a guest domain (I'm not that familiar with xen), you'd still need something running in the guest domain to handle that signal within the context of the console.

All in all, probably not worth the complexity.

-- David


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group