5 ms·
I have tried on multiple occasions to migrate to tmux (because gestures vaguely "it's the future", screen's codebase is ancient and can still connect directly t
by philsnow 4y ago
I have tried on multiple occasions to migrate to tmux (because gestures vaguely "it's the future", screen's codebase is ancient and can still connect directly to a serial port etc), but I just don't like the primitives that tmux gives you ((servers,) sessions, windows, panes).
I use a nested setup with screen where each level of nesting has a different escape key, this works really well when I want an inner screen to be on a different machine.
screen '-e^Zz' -S meta
and then inside that one
screen '-e^Oo' -S project1
and for a session on a remote machine
mosh some_server -- screen '-e^Oo' -S remote_session_name
I haven't figured out a way to get this to work well with tmux, because the local tmux server doesn't know about the remote tmux sessions. Whereas with screen, screen doesn't need to know or care about that.
(edit: I use shell aliases, I don't type out the '-e^Oo' etc every time)
- lanstin 4y agoI use backtick, hen two back ticks, then four. Only rarely have to go to eight backticks. :)
- xenophonf 4y ago> screen's codebase is ancient and can still connect directly to a serial port That particular feature is pretty important to me, and it would suck if it got removed. Just because a codebase is ancient doesn't mean it's useless.
- ijustlovemath 4y agoEmbedded Linux user? We used screen & minicom extensively in my unis satellite lab
- copperblue 4y ago[dead]
- em-bee 4y agoi do exactly that with tmux. the primary difference is that don't nest tmux locally, but each tmux session is on a different computer, so they all just need their local config where the escape key is specific to the computer. why does the local tmux server need to know about the remote tmux session?
- pbalau 4y agoI can't figure out an use case for your setup, can you help a bro out?
- Jtsummers 4y agoNested sessions. Hypothetical: local computer with screen \ \ ssh/mosh to remote A, run screen \ \ ssh/mosh to remote B, run screen If each uses the same prefix (the default is C-a for screen, C-b for tmux) then you have to send it multiple times to send a command to the screen sessions on either of the remote systems. If you give each a unique prefix then you can send the prefix once and it goes directly to the desired screen session. Easier to give each system its own prefix that's constant regardless of depth, though, than trying to remember "Did I connect to A first or B first today?". Or, better in my experience, don't nest them. It's a pain however you choose to deal with the prefix problem.
- philsnow 4y agoInstead of keeping N terminals open for N projects, I usually keep only one open and put each project in a screen session, then wrap them all in a “meta” session. I started using this pattern before I moved to macos, but now that I’m usually on a mac, it helps because I still haven’t gotten used to macos window / desktop management. Managing one terminal is easier than a half dozen.
- ilyt 4y agoI do that except with terminal emulator sessions. One window with few tabs per virtual desktop, as I rarely need to have more than 2-3 projects open at the time it works fine. But... isn't tmux sessions exactly what you'd need for that? One session per project, then just connect to servers from within tmux windows There is even switch-tree (default C-b w) that will show each session with every sub-window in it, and even preview window below that showing each terminal (refreshable via space)
- kzrdude 4y agoI'm looking to skip tmux and migrate straight from screen to zellij instead, since it's also modern. I don't have many problems with screen, but lack of full color support (for vim) and wanting more terminal control codes (hyperlinks, text underlines, sixel, etc) speak in favour of using a more modern solution.
- qwertox 4y agoThanks for pointing out zellij [0]. I wasn't aware of it and am really glad to have read about it. It's odd. A couple of days ago I watched Tristam Oaten's No Boilerplate video "Oxidise Your Life" [1] and it left me thinking about how Rust is moving some programmers to rewrite tools in Rust and, while at it, adding modern features. It's nice to see that. [0] https://zellij.dev/screencasts/ https://zellij.dev/screencasts/ [1] https://www.youtube.com/watch?v=dFkGNe4oaKk https://www.youtube.com/watch?v=dFkGNe4oaKk
- dmd 4y agoI want to love zellij but can't get over how it binds its own actions to practically every key (vs screen/tmux which take just one, the prefix). Do people who use it not use any programs that use control or alt keys?
- kzrdude 4y agoI also trying to come to terms with this, mostly need to design new custom key settings. Zellij has Lock interface, default Ctrl+G, which you can use and in that mode it only takes that one key, but it's a bit different from how screen works.
- dmd 4y agoYeah, but that's more than twice as many keypresses now.
- OrderlyTiamat 4y agoI recommend using tmux mode and adding its keybind to locked mode, that way you get the same key interactions as tmux itself. Sadly, zellij doesn't offer the same options for which key that will be (in screen and tmux I like using C-] cause it's usually unused, but you can't use that one in zellij)
- ilyt 4y agoI just have one level and search function. C-b s gets me graphical(via rofi + some scripting) searchable list of windows, in rare cases where I'd need tens of them. But it took me a while to make tmux keybindings that are fast & convenient, screen defaults (aside from C-a that collides with bash/emacs) on keybindings are way better.
- Dylan16807 4y ago> I haven't figured out a way to get this to work well with tmux, because the local tmux server doesn't know about the remote tmux sessions. Whereas with screen, screen doesn't need to know or care about that. I'm missing something here. Why does tmux need to know or care?
- dbtc 4y agoI occasionally open tmux on a remote machine from within a local tmux. Using c-bb to get to the nested one doesn't seem that bad to me as long as it's only 2-deep. But why not just change the escape key on each machine's .tmux.conf?