Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been using screen for almost 10 years now, is it worth switching? I know it's not much learning but why switching when screen is not broken? It feels like there's more important stuff I can learn.


Another option would be to split screen's roles of "terminal multiplexer" and "terminal detacher" into two programs: dvtm and abduco, respectively. I find that approach more flexible than screen/tmux, and it works better spanning work environments where I might or might not have tabs and splits built in to my window manager or terminal emulator. It's also nice to not have to give up C-a or C-b keybindings when I don't need multiplexing (abduco uses just one key binding, and I think you could get away without it).

abduco: http://www.brain-dump.org/projects/abduco/

dvtm: http://www.brain-dump.org/projects/dvtm/


Better; use dvtm within Screen. This is what i do; one Screen session (fullscreen size) on my main dev box with each Screen window running its own dvtm instance. Thus each Screen window becomes a "workspace" (if needed, connected to a remote host) with dvtm-managed multiple tiles/shells. Flexible and not too complicated with all the power of Screen and the simplicity of dvtm. In fact, i use this setup even when working on my local machine. Throw in vim for the editor and you have a simple and standard setup which you can carry with you everywhere.


I appreciate the simplicity of abduco when saving sessions of already TUI-intensive programs like MUD or IRC clients.


When starting my GNU Screen journey 10-ish years ago, I immediately switched the meta key to Ctrl-K, which I had never used for anything in any app up to that point.


> I have been using screen for almost 10 years now, is it worth switching?

I've been happy with the switch. I was a long-time `screen` user, too, and something that helped me a lot with the switch to tmux was adding a few lines to my ~/.tmux.conf to change the command prefix from ^b to ^a, like screen. It made the muscle-memory shortcuts I'd used for so long still basically work.

  unbind C-b
  set -g prefix C-a
  bind-key a send-prefix
Hope that helps, and good luck!


I switched from screen to tmux two days ago (after a few failed switchover attempts in the past) and "bind-key a send-prefix" was the big thing I was most missing. Thanks for that one.


I've been using screen for closer to 20 years, and switched a couple of months ago. Still undecided.

My major painpoint might seem minor, but: If you're using the default ctrl+a meta in screen, and usually keep ctrl pressed when cycling through screen windows, it will take some getting used to tmux as you need to release ctrl as it will otherwise read it as another combination.

Most other stuff is configurable to your liking, though I prefer adapting to new defaults to evaluate the mindset behind the tools.

It's otherwise less different than I imagined, and I'm not sure how much you'll gain from the switch. Unless tmux gurus know a lot of cool secrets that I don't.


I switched from screen to tmux some years ago. Long enough that I can't remember exactly why. I held off for a while, but remember finding a handful of small cases where tmux was a bit smoother. Nuanced type things.

If you're using screen, you're already sipping the terminal multiplexer coolaid. I think it's the paradigm that's more important than the specific program/implementation.


If you've used screen for 10 years, learning tmux will take about 10 minutes. There's also some handy plugins: https://github.com/tmux-plugins

Really, if screen works for you, tmux isn't going to change your life. And I say this as someone who used screen for at least 10 years before switching to tmux.


I tried it for awhile, was puzzled by their choices of defaults, and ended up switching back to screen.


I prefer tmux to screen but the default key mappings took some getting used to. I've used it long enough that Ctrl-B and " / % for the screen splitting are natural to me now, but initially it was ... rough.


You could remapped whatever you don’t link.

I have Caps Lock set to be Ctrl and tmux set to use Ctrl+a. For a vertical split, I have it mapped to Ctrl+a, |. For horizontal, Ctrl+a, -

It’s pretty flexible.


Forgive me for asking a sort-off-offtopic question, but what's the reason terminals - and therefore the programs which run within them - offer such limited scope for ctrl-key usage. A lot of characters are not available for remapping, such as ctrl-numeric-digit, or ctrl-shift-anything etc. What's the root cause of this? Is it telnet related? ssh? And, assuming there's a compromise somewhere, would it be possible for the problem to be lifted with a config option which says "I'm using this shell locally on my chromebook - please don't inflict this 40 year old restriction on me"?


> What's the root cause of this?

It is stems 100% from the terminal emulator. Just install a better one. Test your keys with https://metacpan.org/source/PEVANS/Tickit-0.67/examples/demo...

Screenshot: https://i.imgur.com/JfHjJXy.png

The only key combos marked not ok are global/taken by the window manager, so they don't arrive at the application.


Not sure why ctrl-a and ctrl-b are such popular prefixes, I use both a lot editing readline.


I definitely hear you on ctrl-a. No idea what ctrl-b does, though?


It moves the cursor back one character (which is the default readline binding). In screen's case, you can send ctrl-a to readline by pressing ctrl-a a.


Exactly! Have you found any decent replacement?


I use a backtick, but don't edit much e.g. markdown in my tmux sessions, and always use $(...) for command substitution so I don't normally feel any pain. One oddity with tmux is that to escape the control character you don't press it twice, you press the escape char then ctrl-b, so that is a lot of extra movement around the keyboard


Backtick is my favorite too. Interestingly I thought it was an obscure choice, but it seems to be the 3rd most popular prefix from an analysis of tmux.conf files on github (after Ctrl+A and Ctrl+Space). I use `` (double-backtick) to escape the backtick and it's eminently reasonable.


Could you bind prefix + ` to insert a literal backtick? I've only ever used the default ctrl-b prefix so I'm not sure.


I like ^Z, since it's about the only keybinding that's not used by common terminal software. To actually send a program to sleep, just double up: ^Z^Z

    # In ~/.tmux.conf Change prefix key to Ctrl+z
    unbind C-b
    set -g prefix C-z


Control-Space is perfect for me


And compliments vim really well if you set your leader key to space.


I use Ctrl + q


I often run screen sessions inside tmux if I need to ssh to remote machines. tmux is beautiful and I say that as a screen veteran.


> I often run screen sessions inside tmux if I need to ssh to remote machines

What possible reason can there be?


I've had nested tmux sessions before. Usually I'll have a couple tabs on my local device, and then may want to ssh to a remote server and interact with a persistent tmux session there.

I usually make a point of setting different prefix keys in that case though.


I often run tmux in ssh in tmux. The outer tmux is just for my local terminals. The inner tmux is mostly so I can reattach later. Though it is also nice to easily get two shells on the remote machine side by side.


Maybe they mean tmux is not installed on the remote machine but screen is, so screen is inside the ssh session, inside the tmux session


Maybe for avoiding shortcut clashing.


Started with tmux, but during 4 years of using it updates broke my config files several times. Then around a year ago turned to screen and am really pleased about the decision: no more config-broking updates; available by default on most systems; by adjusting a few details was able to match my previous tmux setup exactly.


I switched to tmux because of this bug: http://savannah.gnu.org/bugs/?26723 Huh, which apparently got fixed about three years ago, after being open for seven years.


After a years in the development doldrums, Amadeusz Sławiński took over as project maintainer of GNU Screen. Since 2014, he has done sterling work: fixing bugs and adding useful features with multiple releases between then and 2017.


I've also mainly used screen for over a decade and it's good enough for one-off sessions, especially if your terminal supports tiling and panes by default, but I feel that tmux is more robust and easier to configure and you get tiling and panes out of the box that work in any terminal emulator. I think it's worth the switch, and I should set up a tmux again for myself too.


Working with multiples sessions is more convenient and ergonomic in tmux, don't know if screen caught up in this area.


I'm a long-time screen user, and I recently switched to tmux purely because it seems to handle high-color and unicode more cleanly than screen. I configured it to completely replicate my screen setup so that I didn't have to learn anything.


One thing I had in screen that I think tmux doesn't support is ..."stack keys"?

e.g., in screen I could configure "^a j p" to do one command and "^a j d" to for another:

> bind j command -c foo

> # CMD KEY NAME CMD

> bind -c foo p screen -t '% |db' make db

> bind -c foo d screen -t '% |prod' ssh prod

If that's possible, I'd love to know how. It's what stopped me from switching a few months ago, and is now the most painful change after switching again a couple days ago.


Do you mind posting your rc files for this config?


I literally just switched in the past two months (actually, went from having used screen two jobs ago (~2 years ago) to using tmux at my current job). I'm on the tmux train now and I'm pretty happy with it.


tmux adds more structure to windows, panes, layouts,.... which is not necessarily a good thing in the sense that you can't easily build an arbitrary layout from another arbitrary one. It all depends on your workflow, but tmux can't emulate the completely freestyle layouts of screen.

On the plus side, tmux has plugins that allow pretty sophisticated interactions (more than tmux)


not sure how screen is today but I switched to tmux because vsplits were builtin (back in the days you needed patches for screen)


screen has had a vsplit feature for several years now (ctrl-a |) in the screen package in the fedora upstream repositories.


Ditto. I like the logging capabilities and multiple pane capabilities in tmux better than I do in screen.


Does screen offer splits? Those are game changing for me. I can't go back to screen without then.


Yes, vertical and horizontal


I've been using screen for a while and came here to post the same question motivated by my thought that most likely we're probably not missing out on anything.


Tried tmux, then went back to screen. Tmux is for hipsters.


There is also the difference in licenses, and as in users voting with their feet, I chose the BSD licensed alternative to terminal muxing.


Comments like yours have nothing to do on HN


Meaning what? It's different?


I feel like tmux is styled more towards Mac users, with rich UI and verbose options.

screen is more akin to a unix program that borrows the styling of options from getopts.


Totally agree. Also, screen is usually default installed on fresh distros. You have to go out of your way to install tmux


> You have to go out of your way to install tmux

You have to type: apt install tmux. Or, whatever your distro of choice's package manager install line is. I'd hardly call that going out of one's way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: