by jauntywundrkind · 1mo ago · 0 comments
I chatted with Astra about this ask here: https://chatgpt.com/share/6ac42567-c404-83e8-b8fe-d29040f451...
I flip on and off using my own term-preserver toolkit, which let's me autoreconnect to servers (via ssh) and or tmux sessions automatically. https://tangled.org/jauntywunderkind.bsky.social/term-preser... . There's a variety of others like this, zmx, zmosh, https://github.com/neurosnap/zmx https://github.com/mmonad/zmosh
Sharing one SSP connection across several terminals is a big protocol change, and I'm deliberately keeping mosh-rs wire-compatible with upstream, so I don't want to go off on my own there. For "lots of tabs, one connection" the thing that works well is one mosh session into tmux, and tmux control mode (tmux -CC) if your terminal supports it. That gives you native tabs over a single mosh link, which is about as close to ControlMaster as you can get with mosh's design.
I tend to have ~20+ tabs open and each one has it's own tmux session inside of it, with multiple windows. I do think that making a terminal that can script and control multiple tmux sessions via control mode is, sort of, the longer destination ahead for me! That'll be exciting.
If the host is behind a NAT then use =local instead of =remote.
im also currently making it so mosh-rs prints a hint when it sees a ControlMaster socket the default mode is about to bypass. should be out soon.