GNU screen fails to resize with Snow Leopard xterm

2

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
XTerm(244)

Versus the version in Leopard:

$ /usr/X11R6/bin/xterm -v
X.Org 6.8.99.903(241)

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

genehack

Posted 2009-08-28T19:32:27.827

Reputation: 131

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 – 2009-08-31T03:03:30.817

Any particular reason why you're running screen inside of xterms rather than in Terminal or iTerm? No judgment, just curious. – Doug Harris – 2009-09-02T19:57:21.213

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 – 2009-09-03T09:24:15.897

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 – 2009-09-04T17:37:03.893

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 – 2009-09-04T17:38:49.740

Answers

1

Based on this Apple support page, adding

resize >& /dev/null

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

genehack

Posted 2009-08-28T19:32:27.827

Reputation: 131

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 – 2017-05-18T00:38:25.627

3

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!

user27084

Posted 2009-08-28T19:32:27.827

Reputation:

Thanks, ran into this problem when using ssh from SL to an Ubuntu server. This fixed it. – sal – 2010-02-28T05:41:06.187