iTerm2 to set LINES and COLUMNS on resize

827 views
Skip to first unread message

david

unread,
Jan 30, 2011, 3:59:49 AM1/30/11
to iterm2-...@googlegroups.com
Hi,

I am working with embedded devices running Linux stack inside. Most of communications are done via serial line (USB). What is bugging me for quite some time is terminal window size. The default is 24x80 and I used a different one as default, I love resizing it and going to full screen, but that does damage. Linux on chip does not detect resizes like it works with ssh connections. Each time I have to manually set those variables to make programs work normally (e.g. do not overwrite text).

Could there be an option in iTerm2 that it would manually set terminal window size, for example via LINES and COLUMNS environment variables?

-david

George Nachman

unread,
Feb 3, 2011, 2:21:13 AM2/3/11
to iterm2-...@googlegroups.com
I think your best bet would be to use a shell script that resizes the session to the size of a fullsize screen and sets LINES and COLUMNS appropriately. There isn't a (reasonable) way to set environment variables after a session has already begun.

Rainer Müller

unread,
Feb 7, 2011, 4:02:35 PM2/7/11
to iterm2-...@googlegroups.com, david
On 2011-01-30 09:59 , david wrote:
> Could there be an option in iTerm2 that it would manually set terminal
> window size, for example via LINES and COLUMNS environment variables?

If you are using bash, add this to your .bashrc:
shopt -s checkwinsize

Rainer

Reply all
Reply to author
Forward
0 new messages