Screen in an amazing tool. The latest version from CVS adds an amazing feature to allow you to split screens vertically (previously you could only split horizontally), which is extremely nice if you have a widescreen monitor. The only problem is that the patch isn’t yet included in MacPorts or Fink for this feature.
Here’s how to fetch it from source, patch it and build it yourself on OSX (tested on 10.5.3). First we need to check out the source:
shell> cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/screen co screen
Next, we need to manually apply the patches from MacPorts (assuming you’ve used MacPorts before). First change into the screen directory and apply the following 3 patches:
shell> cd screen/src
shell> patch < /opt/local/var/macports/sources/rsync.macports.org/
release/ports/sysutils/screen/files/patch-maxargs
shell> patch < /opt/local/var/macports/sources/rsync.macports.org/
release/ports/sysutils/screen/files/patch-windowsize
shell> patch < /opt/local/var/macports/sources/rsync.macports.org/
release/ports/sysutils/screen/files/patch-pty.c
(Each of those should be on one line, I had to split them up to make the wrapping better).
Now, configure using the same method as the macports:
shell> ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc
From there, you should be able to do a make
and make install
to get your screen up and running. Vertical-split is bound to ctrl+a – | (control-a and pipe) (substitute whatever your bind key is for ctrl+a). Then you can use ctrl+a – :resize <x> to resize the window, where <x> is x%, -x, +x or x. Here’s a screenshot of it in action:
E wrote:
Works perfectly even 6 months later
Link | April 22nd, 2009 at 7:54 am
snc wrote:
I just looked and saw that the screen available in MacPorts has the patch “wrp_vertical_split”
Link | August 26th, 2009 at 7:32 am
Lee wrote:
@snc, Awesome, I’m glad to see they added that
Link | August 28th, 2009 at 9:42 am
Carlos E. López wrote:
Worked on OS 10.6
:]
Thanks
Link | September 27th, 2009 at 2:28 pm
Per Wiklander wrote:
Or try tmux http://tmux.sourceforge.net/, available in MacPorts as well.
Link | December 11th, 2009 at 11:27 pm
Donovan wrote:
I couldn’t get this to work on 10.6. I also tried looking in macports and did “sudo port install screen” and that worked fine, but no vertical split?
Link | June 30th, 2010 at 4:39 pm
Patching GNU Screen with vertical split support in OS X - Evan Meagher wrote:
[…] window splitting. A bit of Googling revealed that this is a common problem and I zeroed in on a Mac-centric solution before finding that the specified windowsize patch doesn’t […]
Link | December 31st, 2010 at 3:48 pm
What's a good substitute for gnome terminal? wrote:
[…] screen that comes with Mac OS X does not come with this feature, I built it from CVS according to directions I found on this blog. I assume you could do the same for Linux by skipping the patch steps. Answered by […]
Link | February 22nd, 2012 at 9:56 pm