Saturday Nov 26, 2011

Install tmux on Mac OS X

This is a short run down on how to get tmux running on your Mac OS X system. The same methodology applies when compiling this on Solaris.

What is tmux?

According to the developer's page, "tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached".

Why not just use screen?

For me, the primary reason I switched to tmux from screen is the much easier configuration syntax that tmux offers. If you've ever struggled with formatting screen's caption or hardstatus line, then you will appreciate the ease with which you can achieve the same results in tmux.

Preparing your environment

You will need a C compiler installed. I believe that OS X ships by default with GNU make, but if not, then you will need to obtain it or use Xcode.

Download the sources

While I'm putting all this together, I like to keep everything neatly tucked away in a build directory.
mkdir ~/build
cd ~/build
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz

Unpack the sources

tar xzf tmux-1.5.tar.gz
tar xzf libevent-2.0.16-stable.tar.gz

Compiling libevent

cd libevent-2.0.16-stable
./configure --prefix=/opt
make
sudo make install

Compiling tmux

cd ../tmux-1.5
LDFLAGS="-L/opt/lib" CPPFLAGS="-I/opt/include" LIBS="-lresolv" ./configure --prefix=/opt
make
sudo make install
That's all there is to it!
About

Ben is an Enterprise Architect in the Oracle Systems sales consulting business in Melbourne, Australia. This blog focuses on Solaris and Oracle Sun servers, storage and networking.

Search

Categories
Archives
« November 2011
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
27
28
29
30
   
       
Today