Clone this wiki locally
LGSM uses tmux to run servers in the background so the instance is not lost when you close a terminal session.
Tmux is a key component of LGSM and replaced screen which was used on early versions of LGSM. tmux has a few improvements over screen; mainly being better at handling of non root users which was a major issue when developing LGSM with screen. tmux allows LGSM to call up a game server running an the background so you can see what it is doing; this feature is available with console feature of LGSM.
LGSM requires tmux => 1.6 to enable console logging.
You cannot run a tmux session inside another tmux session or inside of a screen session.
tmux 1.8 has an issue that prevents console logging from working. This is because the
pipe-pane feature is broken in tmux 1.8 causing is not to output the console to the console log files. The only solution is to use another version of tmux.
Upgrade Tmux CentOS (7)
Upgrade Tmux Ubuntu
Here are the steps to update Ubuntu - version 14.04 only (see below for other ubuntu versions):
sudo apt-get update sudo apt-get install -y python-software-properties software-properties-common sudo add-apt-repository -y ppa:pi-rho/dev sudo apt-get update sudo apt-get install -y tmux=2.0-1~ppa1~t
If you have another ubuntu version you might want to install a different tmux version from the same repo. So:
ubuntu 12.04 (Precise Pangolin) step 5:
sudo apt-get install -y tmux=1.9a-1~ppa1~p(installs tmux 1.9)
ubuntu 13.10 (Saucy Salamander) step 5:
sudo apt-get install -y tmux=1.9a-1~ppa1~s (installs tmux 1.9)
ubuntu 14.10 (Utopic Unicorn) step 5:
sudo apt-get install -y tmux=2.0-1~ppa1~u
ubuntu 15.04 (Vivid Vervet) step 5:
sudo apt-get install -y tmux=2.0-1~ppa1~v
create session failed: Operation not permitted
This issue occurs on CentOS mainly. This is caused by the standard user not having permissions to user /dev/ptmx.
create session failed: ./srcds_linux -game csgo: Operation not permitted
To fix this the user needs to be part of the tty group.
usermod -G tty csgoserver
To check the user has been added check /etc/group.
grep tty /etc/group
Installing the latest tmux from source on CentOS 7
If you are on an older tmux version on CentOS you can upgrade to the latest version following this guide.
NOTE: you will be compiling tmux from source, meaning your package manager will not take care of future upgrades.
NOTE: Any extra requirement like git,tar is upto you to install
Getting the requirements
tmux has a library dependency on libevent which, of course, is not installed by default.
- wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
- tar -xzvf libevent-2.0.21-stable.tar.gz
- cd libevent-2.0.21-stable
- sudo make install
Getting tmux source
Grabbing the tmux source
- git clone https://github.com/tmux/tmux.git
- cd tmux
- sh autogen.sh
- sudo make install
Verify you are on the latest tmux.
- tmux -V
(currently: tmux 2.3)
If you encounter 'libevent not found' during the tmux compiling/install.
yum install libevent-devel
If you encounter 'curses not found' during the tmux compiling/install.
- yum install ncurses-devel
yum install glibc-static
If you encounter 'protocol version mismatch (client 8, server 7)', you need to kill previously opened tmux sessions.
- pgrep tmux
- kill PID_numbers
Note on live servers
You can install tmux while the server are running, however restarting/stopping them will not be possible
You can do either of the following possibilities
- Stop all servers before upgrading tmux
- Upgrade tmux while servers are running, but you must kill the tmux processes to be able to start a new one running the latest version
- Manually attach the running tmux and manually shut it down.