2

We have been trying to create numerous shared Tmux sessions for various games on our server. A quick google showed up with solutions such as:

tmux -S /tmp/game new -s game
chgrp game /tmp/game
# then connect via
tmux -S /tmp/game attach -t game

This worked for the first game, but of course the shell remained that of the user that started the tmux instance. So we created a new user for each game. We started the new tmux instance with:

sudo -u game tmux -S /tmp/game new -s game

That still worked, somehow, but it's getting sketchy. The problem we're facing now is starting a different shared instance to which people can connect via a game.sh script.

Doing

sudo -u othergame tmux -S /tmp/othergame new -s othergame

basically exits and does nothing. Trying to connect to it just shows "failed to connect to server".

What are we doing wrong and, more importantly, is there some simpler way to do what we're trying to do?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Pandee
  • 21
  • See if the solution helps: https://stackoverflow.com/questions/16398850/create-new-tmux-session-from-inside-a-tmux-session – George Udosen May 28 '17 at 23:39
  • What kind of game or game administration task requires shared terminal sessions? Tmux isn't designed for shared session. I think you need to redesign your task or use different tools. – David Foerster May 28 '17 at 23:50
  • tmux does support shared sessions and AFAIK this is one of it's use-cases – NeilG May 22 '23 at 03:41

0 Answers0