4 ms·
I don't know how by default, login shells aren't invoked through tmux in 2021. Without it, when your connection gets hung, you lose that session on a remote se
by mekster 6y ago
I don't know how by default, login shells aren't invoked through tmux in 2021.
Without it, when your connection gets hung, you lose that session on a remote server and practically you can't get something done through unreliable connections like on a phone without session resurrection.
And if you had several panes open and want to continue working later, are people just resetting its state everytime they leave the remote terminal?
You only need several lines of config or use byobu to get it to work that way.
- zaat 6y agoI once added it to my bashrc or as the starting command of my terminal,but I quickly removed it since when configured so, if the session detached you have no easy way to open a non tmux terminal session to use for reattaching.
- mekster 6y agoWhat use case that new panes can't fix that you need a non tmux session for?
- zaat 6y agoA use case that is quite common for me is when I work on VM or remote machine, I usually run tmux on the remote, so I can open multiple panes/screens on the remote machine. Nested sessions are not fun, coming with two bottom bars and requiring you to press C-b twice for commands on the remote. Not a use case per se, but the issue I mentioned in GP is that if you detach from tmux session, accidentally or not, and you want to reattach to the session, you need an non-tmux terminal for that, since trying to attach from tmux causes it to complain that "sessions should be nested with care, unset $TMUX to force". Now you can bypass that by unsetting $TMUX, but it really doesn't work. And if your terminal automatically starts tmux you need to change its configuration when it happens or use another terminal or profile. After a week or two of trying I settled on starting tmux manually after launching terminal (which is kitty these days).
- mhuffman 6y ago> are people just resetting its state everytime they leave the remote terminal? This is literally the reason that people use it. It can disconnect and reconnect to the same session. I have had a tmux session running remotely for over a year and I reconnect with it ever day with all my panes and windows still the way I left them.
- mekster 6y agoIt's a really terrible experience for a new terminal user where the color theme is black/white, fonts are very small and bash comes with minimal config and sessions are lost on disconnect. I don't see how the default is never improving for a few decades.