# tmux

<figure><img src="/files/GflsUeAj9K2JQfWvkrG2" alt=""><figcaption></figcaption></figure>

LinuxGSM uses [tmux](https://tmux.github.io) to run servers in the background so the server instance is not terminated when you close a terminal session.

{% hint style="info" %}
LinuxGSM requires *tmux => 1.6*
{% endhint %}

Tmux is a key component of LinuxGSM and replaced [screen](http://en.wikipedia.org/wiki/GNU_Screen) which was used on earlier versions. tmux has a few improvements over screen; mainly being better at handling standard Linux users, this was a major issue when developing with screen. tmux allows LinuxGSM to call up a game server running in the background so you can see what it is doing; this feature is available with [console](/commands/console.md) feature.

![LinuxGSM using tmux in console](/files/-LWrRBg414vWHZnzXdVY)

### tmuxception

Some server admins have attempted to run LinuxGSM within a `tmux` or `screen` session. As LinuxGSM calls tmux it is not possible to run LinuxGSM within a tmux or screen session.

![](/files/-LWrRhEmea-0ytcqyZhe)

## Known Issues

### Tmux 1.8

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 it not to output the console to the console log files. The only solution is to use another version of tmux.

{% hint style="warning" %}
tmux 1.8 is installed on CentOS 7 by default see guide below to installed a newer version
{% endhint %}

## create session failed: Operation not permitted

This issue normally occuires with CentOS and 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 confirm the user has been added check *`/etc/group`*.

```
grep tty /etc/group
```

```
tty:x:5:csgoserver
```

## Upgrade tmux CentOS 7 using Ghettoforge

If the default version of tmux (1.8) installed on CentOS 7 it will fail to log the console output. To fix this it is possible to upgrade to a newer version of tmux using the [Ghettoforge](http://ghettoforge.org) repository.

Install Ghettoforge with the following command.

```
yum install http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
```

Install tmux using the Ghettoforge repo.

```
yum --enablerepo=gf-plus install tmux
```

Once installed restart the server to complete the upgrade.

```
restart
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linuxgsm.com/requirements/tmux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
