Xref: utzoo comp.unix.questions:21364 comp.windows.x:21015 Path: utzoo!attcan!uunet!mcsun!ukc!acorn!ixi!paul From: pd@ixi.uucp (Paul Davey) Newsgroups: comp.unix.questions,comp.windows.x Subject: Re: resetting terminal size. Message-ID: Date: 13 Apr 90 17:53:45 GMT References: <10958@unix.SRI.COM> Sender: paul@ixi.co.uk (Paul Davey) Organization: IXI Ltd. Lines: 69 In-reply-to: ric@ace.sri.com's message of 12 Apr 90 15:06:54 GMT In article <10958@unix.SRI.COM> ric@ace.sri.com (Richard Steinberger) writes: Sometimes I telnet/rlogin into a Unix machine from an X-terminal or workstation. The windows are often bigger than 32 lines. I'd like to be able to use "all" of this space while working on the Unix computer, and have tried "stty rows 32". This seems to register the row entry ("stty all" shows rows as set to 32), but there is no change in the way the window is used (i.e., the bottom 8 lines remain unused, only the top 24 are active.) Is there another approach I should be using? Usually, TERM is set to vt100, and eval `tset -s Q` is done at login. Thanks for any help or suggestions. -ric steinberger ric@ace.sri.com Look in /etc/termcap to see if you can use xterm instead of vt100 as the value for TERM. My system has, as well as the standard xterm, X0|xterm-24|vs100s|xterm terminal emulator (small)(X window system):\ :co#80:li#24:tc=xterm: X1|xterm-32|vs100|xterm terminal emulator (medium)(X window system):\ :co#96:li#32:tc=xterm: X2|xterm-45|vs100-w|xterm terminal emulator (large)(X window system):\ :co#144:li#45:tc=xterm: For 24, 32 and 45 line xterms in /etc/termcap. If you have X11 on the Unix machine use the X11 resize program. From resize(1), Resize prints a shell command for setting the TERM and TERMCAP environment variables to indiciate the current size of xterm window from which the command is run. in a C-shell alias like alias rs 'eval `resize` ' If you don't have resize you may have to settle for several /etc/termcap (or on system V /usr/lib/terminfo) entries, in several sizes. If you are lucky enought to have the Korn shell (or you are a Bourne shell user) then you should be able to trap the WINCH signal (32 on some machines, it may have a different name/number on your machine) to execute the resize automatically when you resize the window. eg, trap 'eval `resize` ' 32 This can't be done in a C-shell since it doesn't have a general signal trapping capability. In ksh you may also want to reset the ksh COLUMNS variable (used by the command line editing) by something like, trap 'eval `resize`; set `stty size`; COLUMNS=$1' 32 There may be a better ways of coping with large or changing-size windows than this so I'm cross posting to comp.windows.x. -- Regards, paul@ixi.uucp IXI Limited Paul Davey ...!uunet!ixi!paul 62-74 Burleigh Street +44 224 462 132 (fax) Cambridge U.K. "These are interesting times" +44 223 462 131 (vox) CB1 1OJ -- Regards, paul@ixi.uucp IXI Limited Paul Davey ...!uunet!ixi!paul 62-74 Burleigh Street +44 224 462 132 (fax) Cambridge U.K.