Installing iterm2 and tmux on a mac

I almost decided to learn emacs, mostly so i could interact with a decent REPL. A little bit of googling dissuaded me from doing so (this christmas) — as there are now a few decent options for SLIME-esque interaction with an REPL in vim.

The setup of choice among this crowd seems to be iterm2 which has been set up to work with tmux (it won’t work if you $ brew install tmux).

In theory, this is simple to setup, as there is now a hosted pair of iterm2 and tmux downloads on the project site. This includes an appropriately patched tmux. If you took the project link above, you will see something like the below:

Screen Shot 2013-03-07 at 5.37.48 AM

You want the two links in the middle: tmux for iterm2, and the iterm2 beta.

After you have downloaded the file, you should see them in your downloads as above. Click on the eyeglass at the right to open the containing folder.  Inside that folder you’ll see something like the following:

Screen Shot 2013-03-07 at 5.42.07 AM

Drop and drag the iTerm icon into your applications folder. Now you have iTerm2 installed!

That was the easy bit. The hard bit (for me) was making sense of the instructions for tmux integration. If you are having trouble, follow these steps with me (note i am assuming you downloaded the zipped iTerm folder into ~/Downloads/).

Open your terminal (hold down Command-space at the same time, and type in ‘terminal’).

$ cd ~/Downloads/
$ tar -zxvf tmux-for-iTerm2-20120726.tar.gz
$ mv tmux ~/
$ cd ~/tmux
$ sh autogen.sh
$ ./configure
$ make
$ sudo make install

At first i could not complete these instructions. At the sh autogen.sh step, i got:

autogen.sh: line 14: aclocal: command not found

… WTF?

If you get this error, you need to

$ brew install automake

Next, at the ./configure step, i got the following error:

configure: error: “libevent not found”

If you get this error, you need to:

$ brew install libevent

If you don’t know how to do that, check this prior post — which gives a step by step tutorial.

For whatever reason, i had to totally restart my computer before tmux would play nice with iTerm2. Before re-start, trying to open a tmux child window failed as follows:

$ tmux -C
protocol version mismatch (client 7, server 6) %exit

Once you have re-started, you should find (when you are in iTerm), that typing tmux to enter a tmux session, and tmux -C to enter a child session work just fine.

[updated 7 March for release of the new item & tmux releases]

Advertisements
This entry was posted in coding and tagged , . Bookmark the permalink.

One Response to Installing iterm2 and tmux on a mac

  1. Pingback: Iterm2 and tmux update | ricardian ambivalence

please comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s