1. 25
  1.  

  2. 5

    This is a pretty interesting review. I feel like most people end up sticking with whichever of these programs they encounter first, as the differences aren’t that great.

    I agree with the author’s criticism that both choices of prefix keys are “bad”, but I also don’t think there is ever really a good choice there. No matter what key combination you choose it will likely conflict with some software and it will be infinitely frustrating when it does.

    Once you grok the passthrough mechanic of screen it isn’t quite as terrible, but it still sucks when you end up in nested screen sessions or want to go to the start of a line. Also it seems particularly egregious to have CTRL-A as the prefix since this is one of the main keys in emacs and readine, which are also GNU projects.

    1. 2

      Control-Z. You don’t need job control inside a screen/tmux session because having multiple screens is job control. It’s literally been 20 years since I set that default and I can’t understand why they never fixed it.

      1. 1

        I remapped tmux to use Ctrl-a over Ctrl-b because, after pass-through, I only ever really use Ctrl-a once, but would use Ctrl-b multiple times. Ctrl-a results in fewer keystrokes over time.

        1. 1

          Ctrl and a are too for my pinkie and ring finger to make it at all comfortable. I don’t know how you manage to put up with that!

          1. 2

            Ctrl is right next to A isn’t it?

          2. 1

            I started using CTRL-space as my prefix a few years ago, and never came back. It is easy to type, and I never encountered it elsewhere.

            1. 1

              Wouldn’t work for an Emacs user. Ctrl-SPC is used to start a selection.

              1. 1

                I tend to forget EMACS potentially has a keybind for each key already. But EMACS can replace tmux anyway, by treating windows as panes

                1. 1

                  It can replace some uses of tmux, but the ability to share a set of windows seamlessly with a collaborator is much more difficult without tmux.

        2. 5

          Something else to consider: if you use George Nachman’s excellent iTerm app on macOS, it comes with first-class integration with tmux (via its command-and-control interface tmux -CC). Meaning that tmux tabs are turned into iTerm tabs, tmux scrollback is turned into iTerm scrollback, etc. This also means you can use iTerm keyboard shortcuts instead of having to go through the special tmux prefix. One of the cool things about tmux is that they accepted patches from Nachman to get the interface implemented. There’s something to be said about having a modern codebase with an invigorated community hosted on a popular social network.

          Anyway I was blown away by the design and execution of the idea when I first ran into it. Thought I’d mention it as some sort of killer feature.

          1. 3

            for me, at least, the primary differences between screen and any successor will always be:

            1. I went to some effort to set up my screenrc years ago and it is still going strong
            2. my muscle memory for screen commands is so ingrained, I’ll probably still be twitching ctrl-A in the grave ;P
            1. 3

              I’m not sure what my reason for switching to tmux originally was, probably the .screenrc syntax being horrible and tmux’s pane navigation being better, but the first thing I dug up was screen keybindings for tmux.

              1. 1

                That’s weird; I switched because even after using screen for almost a decade I could never internalize its key bindings. When I tried out using tmate (after fixing the ctrl-b idiocy) I just tried whatever felt natural and it just worked in tmux. In screen I was constantly referring back to a cheat sheet whenever I went into backscroll.

            2. 3

              tmux has particularly impressive integration with iTerm 2 for macOS. When connected to tmux’s control channel, iTerm displays tmux windows as separate native tabs or windows, uses tmux’s scroll back buffer for search and native scrolling, and synchronizes window sizing across machines. Sadly, it’s not available on other terminal emulators yet: https://unix.stackexchange.com/questions/189805/what-terminal-emulators-support-tmux-control-mode#280829

              1. 1

                Both are far too complicated for me. As a smarter person than I once said, “any command I cannot immediately remember might as well not exist.”

                1. 2

                  typing tmux on a remote server beats having to restart a job when the network connection dies…

                  1. 1

                    That use case fell away for me when I started using mosh.

                    1. 2

                      Mosh is great, but it doesn’t solve the issue with client dying (e.g., due to logout or reboot) and doesn’t let you connect from multiple clients.