Re: Xterm Oddness
Re: Xterm Oddness
- Subject: Re: Xterm Oddness
- From: Brandon Allbery <email@hidden>
- Date: Mon, 8 Feb 2010 14:36:30 -0500
On Feb 8, 2010, at 14:28 , Matt Martini wrote: printf "\e[8;67;96;t" #where 67 is the height and 96 is the width
Would this be true for a Mac system? That's odd. This works. It works in X11 and it even works with Terminal.app. OK, so how do I set this up as a conditional in my bash_profile/bashrc to check for X11 and output this code to adjust the screenwidth?
I use this on a mac using both X11 and Terminal.app. Here is what I have:
if [ "$TERM" = "xterm-color" ]; then printf "\e[8;47;94;t" fi
An alternative to this is:
eval `resize`
which tells bash etc. the actual size of the terminal window in characters. (I doubt it'll work in Terminal.app, just in xterm.)
This is probably the OSX bug (I think a race in the pty driver? IIRC it appeared after an OSX security update) whereby xterm doesn't pass its window size to the pty ("stty -a" shows "0 rows; 0 columns") so the terminal definition's default of 80x24 is used.
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] email@hidden system administrator [openafs,heimdal,too many hats] email@hidden electrical and computer engineering, carnegie mellon university KF8NH
|
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden