JadedEvan
6/19/2013 - 6:12 PM

HOWTO download, compile and installl GNU screen v4.00.03 on Mac OS X 10.7 (Lion)

HOWTO download, compile and installl GNU screen v4.00.03 on Mac OS X 10.7 (Lion)

$ brew install gpg
$ cd ~/src
$ wget http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz
$ wget http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz.sig

Now verify the signature

$ gpg --verify screen-4.0.3.tar.gz.sig

If you see the following error message:

gpg: Signature made Thu Aug  7 03:30:41 2008 PDT using DSA key ID 4A1B4EB1
gpg: Can't check signature: public key not found

You need to get the signature key. Use the trailing signature from the previous error message (4A1B4EB1)

$ gpg --recv-keys 4A1B4EB1

Unzip and untar the file

$ gzip -dc screen-4.0.3.tar.gz | tar -x
$ cd screen-4.0.3

Note that when building on 10.7 you're probably going to run into this issue which is a documented bug in this MacPorts ticket

pty.c:38:26: error: sys/stropts.h: No such file or directory

Download and apply this patch and then proceed with the usual configure, make and make install

$ wget https://trac.macports.org/raw-attachment/ticket/13009/patch-pty.c
$ patch -p0 < patch-pty.c
$ ./configure
$ make
$ sudo make install

Note that this will install screen into /usr/bin. If you want to change that path (I prefer /usr/local) you can edit the Makefile before you run sudo make install