DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.82k stars 79 forks source link

Prevent tmux nesting #91

Closed twe4ked closed 4 years ago

twe4ked commented 4 years ago

This is the same messaging and behaviour of tmux when you try to nest sessions.

kalekseev commented 4 years ago

It seems that will prevent users to run overmind c proc from tmux, I always work inside tmux and overmind connects to a process without any problems, @twe4ked what the reason to prevent such nesting?

DarthSim commented 4 years ago

I double the question :) Are there any problems with Overmind inside tmux?

twe4ked commented 4 years ago

Nesting tmux sessions does work, but IMO working with them isn't ideal. You need to double hit the prefix key to actually send commands to the nested session. Even quitting the nested session can be confusing, which is why I believe tmux has the error itself.

My reasoning for preventing it is to reduce confusion if you're already running a tmux session and try to connect to one of the processes. If you really do wish to nest the sessions, you can unset TMUX when connecting or make an alias.

I always work inside tmux and overmind connects to a process without any problems

I always work in tmux too but I tried the nested sessions but I assumed it wasn't meant to work that way, and I was meant to open a separate terminal to connect. How do you find working with the nested sessions?

kalekseev commented 4 years ago

How do you find working with the nested sessions?

Usually I connect to the process to debug something quickly and detach, the only thing that differs from doing that in separate terminal is how you detach, instead of ctrl+b once you need to press it twice to send the prefix through your main tmux session (here some details https://stackoverflow.com/questions/8518815/how-to-send-commands-when-opening-a-tmux-session-inside-another-tmux-session/40666319)

DarthSim commented 4 years ago

Thanks for the discussion guys! After estimating everything I decided that it would be better to send the user a warning with an explanation on how to perform tmux commands (double hit of prefix key and stuff), wait for any key, and continue. @twe4ked could you update your PR?

twe4ked commented 4 years ago

Sorry I don't have time right now to add the extra functionality, I don't really know Go so I'd have to go digging through docs to work it out. Thanks for the input everyone!