0
votes

I tried using tmux with iTerm2 recently and it works perfectly for about one minute after I attach using the command via iTerm:

$ tmux -CC attach

However one minute after attaching, on the very next keystroke it detaches, as if it somehow timed out. This happens whether or not I do anything in the tmux window. The session is still there and I can reattach with no problems, but of course it disconnects again after a minute. I don't have this issue when using screen or when using tmux without the iTerm integration. Has anyone had a similar issue or know why iTerm may be detaching?

1

1 Answers

0
votes

Figured it out! iTerm has the following feature:

enter image description here

"When idle, send ASCII code 0" (by default) Since I don't interact with the tmux control window, it sends the null ASCII code after one minute, which appears to cleanly detach the session. It doesn't matter what I do in the tmux windows, whether they are idle or not.

So glad to have worked this out. Not sure why I had this enabled, as I don't think I need it. It explains some other odd issues I have noticed once or twice (randomly pasting in vim, etc)

Goodbye, screen!