Live data from Hacker News

You Don't Need a Terminal Multiplexer on Your Desktop

xn--gckvb8fzb.com

31–40 of 45 posts

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#31
Feels like it's totally missing the point of why tmux is used on desktop and in a very arrogant tone.

Windows manager saves layouts. I want to save both layout and states. I want to be able to quickly switch from one project workspace to another, without having to use ctrl+z and fg or creating term windows everytime.

Also, a lot of people use one workspace for one app on their WM (1 for terminal, 1 for browser, etc...) I like that my terminal has its own workspace, so I don't have to pollute the workspaces of my WM with tons of different terminal windows.

Maybe spend more time understanding the problem that is trying to be solved before writing a long ass arrogant article?

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#32
post #28

Earlier quoted context omitted.

You can remap the prefix key...

I think the point of their comment is that if you're constantly connecting to different remote servers, you're not going to want to have to change the config on each server remotely. It's the same argument for understanding base vi as well and honestly does come in handy, but it's very discipline specific, most people don't have to worry about this use case.

In that case you’d probably want to change your local config away from the default.

But this is all very silly, I mean, of course there are workflows that aren’t assisted by terminal multiplexers. I’ve heard rumors of jobs out there that don’t even use computers. Adding one more job to the pile that doesn’t need the tool doesn’t say anything about the cases where it does come in handy.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#33

I started to use tmux on remote machines to stop them disconnecting me when the network changes or the laptop sleeps. (Damn you systemd for breaking that, too) Then I started multiple tmux panes remotely because it was great for dumping the long process monitoring next to the long process Then I started using tmux panes remotely for task switching. Then I started using tmux locally because I already knew all the keyb…

Just a side note, I think mosh is a much better tool for stopping the disconnections from network changes or laptop sleeps. It uses UDP under the hood instead of TCP so it seamlessly supports roaming (changing of IP addresses). Also brings some great performance improvements as well, especially when the remote process is dumping lots of text to standard out

After a while though, particularly on flakey connections, I end up with dozens of stale mosh sessions on each server, all listening for inbound connections that will never come.

The quickest way to clear them seems to be pkill mosh and then reconnect. It's a known bug with no anticipated fix.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#34
This is a great example of engaging writing that fails to convey an appreciable message and even though I use tmux locally and I had a thought the other day that I should stop, I hope that the author can channel their energy toward a better formula for thoughts.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#35
post #21

From TFA: My impression is that the sole purpose of the terminal multiplexer hype train stems from a perceived sense of pseudo-elitism… —- Whoa there buddy. It’s fine to say: “I tried a thing, and it just wasn’t for me”. But to proceed from that point and onto: “so rather just letting things be, or making a good-faith effort to understand those with differing opinions, I’m going to project and harshly judge them” is…

He's right though. Same for people who use TUI editors. Let's just call a spade a spade.

He's not right. There's a whole host of features and functionality that terminal multiplexers bring to the table that he doesn't even begin to address. For such a long article it's actually quite shallow.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#36
post #17

The argument here seems to be: “the features you like about terminal multiplexers should be built into your terminal emulator, or your window manager, or I don’t see why they are really necessary.” Plus some complaints about influencers. Sure, I’ll just replace my perfectly functional window manager so I can avoid using a terminal multiplexer. Except I’ll still want a terminal multiplexer on servers, so I still need…

> Except I’ll still want a terminal multiplexer on servers Biggest reason not to use a terminal multiplexer locally, imo: There is nothing worse than hitting Ctrl-b twice for every action when you're also using the muxer remotely.

This tmux config turns F12 into a button to toggle the local leader key. You remote into tmux and hit F12, and now your leader key gets sent to the remote tmux instead of the local.

I don't use tmux locally anymore; but I still use the same leader key as tmux in wezterm, and I have a wezterm script to toggle it with F12 just like tmux.

Maybe you'll like it too?

  bind -T root F12  \
    set prefix None \;\
    set key-table off \;\
    set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
    set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
    if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
    refresh-client -S \;\

  bind -T off F12 \
    set -u prefix \;\
    set -u key-table \;\
    set -u status-style \;\
    set -u window-status-current-style \;\
    set -u window-status-current-format \;\
    refresh-client -S

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#37

I started to use tmux on remote machines to stop them disconnecting me when the network changes or the laptop sleeps. (Damn you systemd for breaking that, too) Then I started multiple tmux panes remotely because it was great for dumping the long process monitoring next to the long process Then I started using tmux panes remotely for task switching. Then I started using tmux locally because I already knew all the keyb…

Just a side note, I think mosh is a much better tool for stopping the disconnections from network changes or laptop sleeps. It uses UDP under the hood instead of TCP so it seamlessly supports roaming (changing of IP addresses). Also brings some great performance improvements as well, especially when the remote process is dumping lots of text to standard out

Yes, mosh is great.

Except, neither RHEL nor SLES include it in the base repo. This means getting it approved and installed on servers in most enterprises is never ever going to happen.

Thus, mosh is dead to me (a poor sysadmin who lives under constant fear of The Security Team).

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#38
post #37

Earlier quoted context omitted.

Just a side note, I think mosh is a much better tool for stopping the disconnections from network changes or laptop sleeps. It uses UDP under the hood instead of TCP so it seamlessly supports roaming (changing of IP addresses). Also brings some great performance improvements as well, especially when the remote process is dumping lots of text to standard out

Yes, mosh is great. Except, neither RHEL nor SLES include it in the base repo. This means getting it approved and installed on servers in most enterprises is never ever going to happen. Thus, mosh is dead to me (a poor sysadmin who lives under constant fear of The Security Team).

Good point. It also requires opening some UDP ports, which many security teams balk at. Real shame though because it makes life a lot better.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#39
Arrogant and pointless? You want to use a GUI, go for it.

To me, just because most of my workflow doesn't need to change irrespective if I'm working locally or via ssh, is already making terminal multiplexer a win.

Also, there's something to be said about terminal just being a more productive way to work with computers. The constrains that a terminal puts on software used in it, make the individual pieces compose with each other way better, precisely because text composes better than graphic interfaces. (That's why "visual programming" will always suck.)

My workflow for decades now is entirely terminal with terminal multiplexer and a browser window. The graphical interface works better for exploratory work when I'm mostly navigating and consuming information, like clicking around the web, the textual interface works better for actual precise control and interaction with software. The "GUI" for me is just for changing if my browser/terminal are displayed side by side or maximized and switching between them.

Re: You Don't Need a Terminal Multiplexer on Your Desktop

#40
post #17

The argument here seems to be: “the features you like about terminal multiplexers should be built into your terminal emulator, or your window manager, or I don’t see why they are really necessary.” Plus some complaints about influencers. Sure, I’ll just replace my perfectly functional window manager so I can avoid using a terminal multiplexer. Except I’ll still want a terminal multiplexer on servers, so I still need…

> Except I’ll still want a terminal multiplexer on servers Biggest reason not to use a terminal multiplexer locally, imo: There is nothing worse than hitting Ctrl-b twice for every action when you're also using the muxer remotely.

I prefer it, to the point that I also use the same pattern for my WM with remote and virtual sessions. Keeping the same uniform shortcuts everywhere and just nesting a prefix is a lot easier that having to remember what shortcuts work in what environments. Moving and styling the tmux bar can help (or hurt) keeping muscle-memory mapped to the level you're operating on. At some point, any other approach gets too cognitively complex as you roam and scale[0].

If you only have nested use-cases rarely (or avoid them because you find them cumbersome) I can see how it never sticks but maybe just try leaning into it. YMMV, ofc.

[0]: Please prove me wrong, I'm open to try (:

Post reply on HN