How to make tmux work on a Google Cloud Platform linux vm?

0

The google docs says GCP uses tmux internally to make terminal sessions reattachable, but I cannot get tmux to work for me when I try to use it myself.

This is all that happens:

$ tmux
[exited]
oligofren at dev in ~ 
$ 1;2c

It just exists immediately and leaves that weird byte sequence. I would like to have multiple shells without needing to open many browser windows. Using uname tells me this is a Debian box, but not much else:

3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux

oligofren

Posted 2017-06-21T12:02:54.107

Reputation: 842

What's the output of echo $TMUX? If it's internally already a tmux session, running tmux inside of it is not recommended (but it works if you set TMUX= to unset the tmux var) – Brydon Gibson – 2017-06-21T12:41:59.773

it's empty. [[ "$TMUX" == "" ]] && echo yes; yes – oligofren – 2017-06-21T12:55:53.323

Answers

0

This question was hard to answer as the answer depended on knowing my custom configuration, which contained some OS X specific code for handling copy-pasting. I resolved this a couple a week after posting and you can see the entire commit here in my dotfiles repo.

The culprit was the reattach-to-user-namespace utility previously needed to have copy-pasting work in OS X. As it was lacking tmux crashed on startup.

See my link to the commit for the modern cross-platform alternatives.

oligofren

Posted 2017-06-21T12:02:54.107

Reputation: 842