5 ms·
I'm probably the minority, but I don't see the point of terminal multiplexers. I do see the point of reattaching to shell sessions or attaching from multiple d
by kevincox 6y ago
I'm probably the minority, but I don't see the point of terminal multiplexers.
I do see the point of reattaching to shell sessions or attaching from multiple devices.
But I already have a window manager that can manage multiple windows. I can reattach to as many sessions as I like and use my window manager to move them around. I don't see why I would want another window manager inside of an application. These nested window managers just seem to add complexity.
- kps 6y agoYes, they only thing I ever use one for is reattaching to sessions. I think the reasoning is that the client terminal could change, so the multiplexer ‘must’ emulate a terminal. However, my client terminal type in fact does not ever change, and I would prefer to have it available rather than the multiplexer's half-baked emulation.
- dTal 6y agoIt emulates a terminal because there needs to be a terminal there for the program to write to when you're not attached to the session.
- kps 6y agoBy ‘emulating’ I don't mean providing a pty, I mean providing a terminal emulator in the usual sense of interpreting control sequences to maintain a screen representation. Dtach and abduco (which I only learned about from this thread) does the former only, while tmux and screen do both.
- gerikson 6y agoI have tmux running in a ssh session on a VPS. In the first window, I have IRC, in the second a Twitter client, and in the following whatever random stuff I'm hacking on at the moment. This means I can keep online from wherever I have an ssh session. Very convenient!
- syntonym2 6y agoI'm in the same boat and like abduco [0], which does exactly session {de,re}attaching and not more. The author suggests to pair it with dvtm (terminal multiplexer without session {de,re}attaching), but of course just using a window manager works just as well. [0] https://www.brain-dump.org/projects/abduco/ https://www.brain-dump.org/projects/abduco/
- kevincox 6y agoOh, that's really nice. I'll consider swapping that for tmux.
- orev 6y agoEvery time a post about multiplexers comes up, there is a comment like this. I find it striking that so many people think that their use-case is the only one, and don’t make any effort at all to imagine other cases where the situation might be different. It’s really not that big if a stretch to see how they would be useful or even necessary when accessing servers (or any machine) remotely. You can have multiple shells and multiple things running, without having to re-login for each separate thing. And for critical processes you need to run, you want some protection to stop them getting killed if there’s a network problem.
- kevincox 6y ago1. I never said "they shouldn't exist" or are useless. I just said that "I" don't see the point. As for multiple shells I just use SSH multiplexing and keep my tmux sessions having one window each. Then I can regroup or reorganize however I wish and still use the same window manager. But I use an SSH key anyways so logging in again is transparent. (The multiplexing just speeds it up a tad) > And for critical processes you need to run... I explicitly said that I understand the benefit of reattaching. I just personally don't find a use case for the multiplexing part.
- orev 6y agoThe phrase “I don’t see the point” means that one does not think there is a use for something and cannot imagine one. Like selling sand in the desert. If you meant “I personally don’t use this feature but I can see how others would find it useful”, then that is not what is meant by that phrase.
- flameW4rVet 6y agoSimilarly every time there’s a comment like the parent there’s a snarky reply reminding us of the obvious: variety exists in the world!
- jimbobimbo 6y agoI'm using tmux in Azure Cloud Shell all the time. Start long running helm command, split pane, monitor progress with kubectl. If command takes too long to run and shell disconnects, chances are tmux attach will get me back to where I was.
- kevincox 6y agoFor me it is the same, just instead of splitting the pane I open a new window on my desktop and SSH in.
- dokem 6y ago1) For me, I don't really do anything fancy with my window manager(s) and consider my work mostly terminal oriented. So I want a workflow that isn't dependent on what terminal emulator or operating system i'm on locally. 2) If i'm shelled into a system I just want to open another pane quickly to look at something, not open a new window, ssh, then move to that directory. 3) I get tired of configuring things to work the way I like. If I can copy my vim and tmux config, I know I can get to work and be comfortable. I don't have to worry about making different different OSs and terminal emulators act the same. I want my coding workflow/muscle memory to be based around things running in the terminal, not a mix of terminal and non-terminal/local things. It seems more unix philosophy oriented to me. 4) I can move from office to lab or go home and pick up right where I left off without any remote desktop nonsense.
- deleted 6y ago[deleted]
- justwalt 6y agoI use tmux a lot at work because it allows me to do multiple tasks at once over ssh. Also, the synchronize-panes function is incredible for configuring multiple servers identically at the same time, which is a task I perform on a weekly basis. And of course, the ability to reconnect to a session is excellent as well.
- rektide 6y agoThere are some dueling abstractions, yes! There was a good write-up from Anil Dash that picked up one of my favorite pieces of the recent TabFS write-up[1][2], _Keeping Tabs on Abstractions[3],_ noting that the browser & OS are each running competing abstractions for tabs. The application's invention of the Multi Document Interface (MDI) has done weird things! And I feel like most consumer OSes have done little to try to unify or provide options in the OS level, to take back territory. I as quite happy & pleased when Google's Chrome on Android had tabs each appear as tabs in the OS. I have too many tabs, but I enjoyed that it was up to my launcher, up to my os to help me work with that. It gave me flexibility & options to approach the problem. Where-as, when Chrome went back to managing tabs itself, it's both been a disaster for me (new tab window shows me the start of my tabs, which has some years old tabs i only need occasionally), and a sadness, a defeat, that the OS can no longer manage this thing. > I do see the point of reattaching to shell sessions or attaching from multiple devices. I've recommended dtach[4] elsewhere[5] in this topic & here-by recommend it again! Very lightweight detachable proxy for persistent programs. I run vim inside of it, so I can attach/detach. Vim has terminals inside of it, so that's all I needed. [1] https://omar.website/tabfs/ https://omar.website/tabfs/ [2] https://news.ycombinator.com/item?id=25600338 https://news.ycombinator.com/item?id=25600338 [3] https://anildash.com/2021/01/03/keeping-tabs-on-your-abstractions/ https://anildash.com/2021/01/03/keeping-tabs-on-your-abstrac... [4] https://github.com/crigler/dtach https://github.com/crigler/dtach [5] https://news.ycombinator.com/item?id=25792205 https://news.ycombinator.com/item?id=25792205
- kevincox 6y agoI agree with you there. I actually wrote a blog post about this recently: https://kevincox.ca/2021/01/11/tabs-were-a-mistake/ https://kevincox.ca/2021/01/11/tabs-were-a-mistake/ The Chrome is an interesting example because it seems that some people liked it but it was arguably a bit of a botched implementation. (It seems like when Chome was killed and opened again it would put all of the tabs at the front, instead of sorting them by the time each tab was last used). Also people were complaining about no longer being able to swipe between tabs, but with Android gesture navigation this shouldn't be an issue anymore. I'll take a look at dtach too. I think one of the benefits of using tmux just for reattaching is that tmux is widely used and tested against all sort of shell escape codes. I have a slight worry that the less popular tools will not handle all of the cases as gracefully. I'm hoping that I am wrong though and it works well.
- jefurii 6y agoI run multiple terminal sessions on a remote box over a single SSH connection through a bastion server. I have an editor in one tab and run my Ansible playbooks Git commands in another, tail logs in a third, etc. You could totally do this in multiple SSH sessions but this is more convenient for me. Byobu made remoting a lot more convenient.
- flameW4rVet 6y agoI do not see the point of them on local machines I do see the point of them on remote machines
- lcall 6y agoFor switching around quickly among multiple xterm instances that I keep running, all the time, and searching history. I used to heavily use konsole but found that switching to xterm + tmux was lighter-weight (fewer extras to install), fast, and very flexible. It took a while to get everything set up the way my muscle memory wanted, but after time working through the manual pages and a few web searches (over time) I'm very happy. I use customized keys for navigating easily around many tmux windows where I like the low overhead so it doesn't break my train of thought). And with tmux panes: it's great occasionally to be able to send the same keystrokes simultaneously to all panes, like to multiple remote hosts). Something like a similar konsole feature, or a variant of pdsh+dshbak. That and fvwm (also customized) make it so I can get where I want between tasks or apps with the fewest keystrokes I've found so far. Edit: that plus that tmux allows scripting, such as to set things up for me automatically after rebooting, in ways that I'm not sure how I would do with shell scripts -- it has added another sphere of automation that I didn't have before -- maybe similar to what one could get with the expect language -- like simple automation inside both shells and apps running in them. Plus more features it has that I haven't tried yet. It is really rich. Another possible benefit from tmux is that it is originally developed as part of, and included in OpenBSD's base distribution, so it hopefully gets the kind of attention and high standards for quality and security as the rest of that OS (like OpenSSH in that regard). (This is not to criticize the other products in this space -- they may be excellent also.)
- adverbly 6y agoPersonally, I really value the fact that tmux has a nice, clean api to manage windows and panes. I have a few scripts which run a bunch of tmux commands to create new windows with multiple panes for logging/consoles/source code for an individual service. Being able to use send-keys(http://man.openbsd.org/OpenBSD-current/man1/tmux.1#send-keys http://man.openbsd.org/OpenBSD-current/man1/tmux.1#send-keys) has been amazing for automating things like this. I'm sure that other tools that I'm not aware of can do this sort of thing, but I find it to be quite productive.