6 ms·
The only annoying thing with tmux are recursive sessions. By that I mean when you run tmux on your laptop, then ssh to your server and start another tmux sessio
by KolmogorovComp 2y ago
The only annoying thing with tmux are recursive sessions. By that I mean when you run tmux on your laptop, then ssh to your server and start another tmux session there. It is suddenly confusing and you then have to escape commands depending on which session you want to interact with.
I’ve been using screen at first remotely for those cases, but eventually bailed out and used my graphical multiplexer locally instead of tmux, or not using tmux remotely when already using it locally.
- ehsankia 2y agoTo me, the only annoying thing with tmux is copy/pasting across different setups and how inconsistent / flaky / tricky it is to get working.
- thanatos519 2y agoI use different escape keys for my local and remote sessions and after many years I don't get confused anymore.
- devsda 2y agoI do the same for one-off tasks. I use ^a as the escape key locally and leave the remote server(s) to use the default ^b because I might need to login to random servers with no shared home or login as a common user and they often have restrictions on adding/changing custom dot files. If it gets too annoying, the remote session is openend in a new terminal tab and I temporarily remap the escape key to ^a on remote tmux.
- tetris11 2y agoThis very much so. I wish there was some kind of SSH "passthrough" that allowed a tmux session on remote to attach to a tmux local.
- jwr 2y agoI made this somewhat less confusing for myself by defining keyboard shortcuts in my Terminal app (MacOS) and using those for switching between tmux screens. E.g. command-n and command-p switch to next and previous locally, while shift-command-n and shift-command-p switch next and previous in a nested remote tmux session.
- mat_epice 2y agoI have a system where I use a tmux-server config that has a different prefix (^O), status bar color (yellow), and location (top). I use that for my outer tmux session, then start default configs on other host systems. Works pretty well, I don’t have any complaints.
- wging 2y agoThe way I typically handle that is via native terminal-app tabbing. Tab 1: local tmux session, tab 2: remote tmux session. (My normal workflow doesn't go beyond 2 systems, 3 in an edge case.) You don't need much support from the terminal to do it this way; it works in gnome-terminal on Linux and iTerm2 on Mac, and probably also macOS's built-in native terminal. You just need an app-level shortcut to go forward/back between tabs, then tmux's shortcuts for navigation within the system. (I don't use iTerm2's native tmux integration, so any poor interactions with that when I'm on Mac aren't a concern, and when I'm on Linux gnome-terminal has just as much utility for me.)
- mrshu 2y agoBeing a big tmux fan, I never thought it would come to something like this, but Zellij (https://zellij.dev/ https://zellij.dev/) has completely solved this for me. I generally run Zellij on my laptop and tmux on remote servers -- it's been a surprisingly positive experience so far. Try it out -- your tmux muscle memory (e.g. all the hotkeys you remember) will also work out of the box.
- wazoox 2y agoFor this reason I usually run screen locally and tmux remotely, that's good enough IMO.
- gitaarik 2y agoYeah that's why I use Kitty tabs for every single tmux session I run :)