I use 120x80 xterms under X11 (which I start via xterm -geometry 120x80). I also use some constantly running GNU screen sessions on a couple of different hosts -- both local to the mac and on some remote Linux boxes.

With Leopard, when I re-connected to an existing screen session, screen would suss out the size of the xterm it was running in and automatically expand to fill it.

With Snow Leopard, this no longer happens. Re-connecting to a running screen results in it coming up in 80x25. I have to resize the xterm window to get the screen session to expand out. Once I've done that once, I can disconnect and reconnect and screen does the right thing.

Is there any way to fix this and go back to the old xterm behavior?

(Snow Leopard does have a new version of xterm:

$ /usr/X11R6/bin/xterm -v

Versus the version in Leopard:

$ /usr/X11R6/bin/xterm -v

Haven't yet tried copying the Leopard xterm over to Snow Leopard...)

  • copying the Leopard xterm over does not fix the problem. screen reports the same version in both Leopard and Snow Leopard, but the binaries are not the same size. However, copying the Leopard screen over does not fix the problem either. – genehack Aug 31 '09 at 3:03
  • Any particular reason why you're running screen inside of xterms rather than in Terminal or iTerm? No judgment, just curious. – Doug Harris Sep 2 '09 at 19:57
  • I frequently run emacs while SSHed into remote servers, and I want the command key to be meta -- and iTerm and Terminal both grab the command key for things like copy and paste. With X11.app, there's an option to disable the keyboard shortcuts and use command for meta. If there was another terminal emulator that let me turn off keyboard shortcuts, I'd happily use that instead of running X11.app. – genehack Sep 3 '09 at 9:24
  • Good reason. I'm running emacs 23 (locally -- not over ssh) and there's an option to change the modifier: (setq mac-command-modifier 'meta). I'm not sure if that will work in a Terminal, ssh'd to a linux box. – Doug Harris Sep 4 '09 at 17:37
  • I've started messing with emacs' Tramp features for remote file editing, but I'm still doing what you do for remote work -- Terminal, ssh, screen, emacs -nw -- and remember to use option rather than command. – Doug Harris Sep 4 '09 at 17:38

I've been having the same problem. Found the solution on one of the Apple X11-Users list threads. Add this to your ~/.Xdefaults file:

XTerm*ptySttySize: true

and restart X11. Worked for me!

  • Thanks, ran into this problem when using ssh from SL to an Ubuntu server. This fixed it. – sal Feb 28 '10 at 5:41

Based on this Apple support page, adding

resize >& /dev/null

into my .bashrc has at least worked around the problem.

  • I encountered this when trying to close a PopUp Window / Dialog Box on Xilinx Vivado when running an X11 from my Mac ... This works, but the problem is annoyingly hard to find. – Xofo May 18 '17 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.