Skip to content

Instantly share code, notes, and snippets.

@andrewlkho
Created April 15, 2014 14:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewlkho/10739476 to your computer and use it in GitHub Desktop.
Save andrewlkho/10739476 to your computer and use it in GitHub Desktop.
Patching GNU screen on Mac OS X for vertical split

This was originally posted on 2011-12-18 to http://andrewho.co.uk/weblog/patching-gnu-screen-on-mac-os-x-for-vertical-split

The ability in GNU screen to vertically split a display so that two windows are visible side-by-side (which is what GNU screen means by "vertical split") is not available in the latest stable release (4.0.3). It is, however, available in the latest HEAD slated for screen 4.1. Various distributions such as debian have merged the upstream changes into their stable versions; Mac OS X (10.7) is not one of them. Here's how to compile it in.

First, clone the latest HEAD (450e8f38 at the moment):

% git clone git://git.savannah.gnu.org/screen.git ./screen.git
% cd ./screen.git/src
% ./autogen.sh

Then apply all of Apple's patches to make it 10.7-friendly. Some of the patches will need to be manually applied as HEAD has diverged a bit from 4.0.3:

% for x in Makefile.in config.h.in configure process.c pty.c screen.c \
> window.c; do
%   curl "http://www.opensource.apple.com/source/screen/screen-16/patches/${x}.diff?txt" \
>   | patch -p0
% done

Finally, there's one header file that needs to be included:

% curl -O http://launchd.macosforge.org/trac/export/23964/trunk/launchd/src/vproc_priv.h

Then compile the source and you're done:

% ./configure --prefix=/usr/local
% make
% sudo make install
@penzur
Copy link

penzur commented Jun 29, 2014

awesome!

@halfpastfouram
Copy link

The launchd link is dead. Any chance of providing an alternative?

@FreedomBen
Copy link

@antsinmyeyesjohnson
Copy link

Tried the other launchd link, no luck.

@FreedomBen
Copy link

Here you go, no more fiddling with launchd links and patches. All the work is now done. Just clone, build, and run: https://github.com/FreedomBen/screen-for-OSX

One liner (but make sure to read Post Installation):
git clone https://github.com/FreedomBen/screen-for-OSX.git && cd screen-for-OSX && ./install.sh

@mavencode01
Copy link

you are a very very bad man - thanks!

@n4nagappan
Copy link

n4nagappan commented Mar 5, 2019

If you see this error on mac : Can't exec "aclocal":
Fix:
brew install autoconf automake libtool berkeley-db4 pkg-config openssl boost boost-build libevent

Another self-note: solution from FreedomBen works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment