-
-
Save apokalyptik/4704088131213bc61cd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mouse support - set to on if you want to use the mouse | |
setw -g mode-mouse on | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
set -g mouse-select-window on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUXVER=1.9 | |
LOCALPATH=$HOME/tmux_tmp/local | |
# create our directories | |
mkdir -p $LOCALPATH | |
cd $HOME/tmux_tmp | |
# download source files for tmux, libevent, and ncurses | |
wget -O tmux-$TMUXVER.tar.gz http://sourceforge.net/projects/tmux/files/tmux/tmux-$TMUXVER/tmux-$TMUXVER.tar.gz/download | |
wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz | |
wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz | |
# extract files, configure, and compile | |
############ | |
# libevent # | |
############ | |
tar xvzf libevent-2.0.19-stable.tar.gz | |
cd libevent-2.0.19-stable | |
./configure --prefix=$LOCALPATH --disable-shared | |
make | |
make install | |
cd .. | |
############ | |
# ncurses # | |
############ | |
tar xvzf ncurses-5.9.tar.gz | |
cd ncurses-5.9 | |
./configure --prefix=$LOCALPATH --with-default-terminfo-dir=/usr/share/terminfo --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" | |
make | |
make install | |
cd .. | |
############ | |
# tmux # | |
############ | |
tar xvzf tmux-1.9.tar.gz | |
cd tmux-1.9 | |
./configure --enable-static CFLAGS="-I$LOCALPATH/include -I$LOCALPATH/include/ncurses" LDFLAGS="-static -static-libgcc -L$LOCALPATH/lib -L$$LOCALPATH/include/ncurses -L$LOCALPATH/include" | |
CPPFLAGS="-I$LOCALPATH/include -I$LOCALPATH/include/ncurses" LDFLAGS="-static -static-libgcc -L$LOCALPATH/include -L$LOCALPATH/include/ncurses -L$LOCALPATH/lib" make | |
############ | |
# install # | |
############ | |
mkdir -p $HOME/bin | |
cp tmux $HOME/bin | |
cd $HOME | |
# cleanup | |
rm -rf $HOME/tmux_tmp | |
echo "$HOME/bin/tmux is now available. You can optionally add $HOME/bin to your PATH." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prebuilt binary download link (works on sandboxes at work)
http://blog.apokalyptik.com/wp-content/uploads/tmux