Hacker News new | ask | show | jobs
by colomon 4310 days ago
Huh. I certainly don't remember step 4 from my time of using screen. Is it a new feature or an option I didn't know about or something?

And what happens if I want to have two terminal tabs on my end logged into the same remote machine? (Which is basically 100% of the time for me.) It seems like that would be a case where mosh would be much smoother...

(Disclaimer: Once upon a time I used screen, but I stopped ages ago. mosh is intriguing, but as long as I'm working from home just plain vanilla ssh is all I really need...)

4 comments

The ability to detach and re-attach to screen has been there since day one... that's probably one of the largest reasons most people use it. Terminal software these days can handle multiple sessions just fine - the benefit is being able to detach and re-attach.

Multiple terminals in one session was more critical back when we were using dumb terminals and whatnot - where you couldn't multiplex locally.

Just so it's clear, I meant specifically the '.bashrc runs "screen -DR"' part, ie automatically going back into the screen rather than needing to explicitly run screen -DR like I used to. (I don't seem to be able to edit my original comment at the moment.)
That's not something screen-specific. You can put whatever you want into .bashrc and it will be automatically run each time you open a new shell. pseudonym just suggested you could use it to automatically run a screen command.
The detach/reattach functionality has always been a part of screen. It's called "multiplexing" (whence tmux gets its name).
> what happens if I want to have two terminal tabs on my end logged into the same remote machine

Don't do that. Open a new window in your screen instead.

Then start giving windows descriptive names. Then start giving them automatic names. Marvel at most fast you've gotten using the window selector (with type-ahead-find).

> And what happens if I want to have two terminal tabs on my end logged into the same remote machine? (Which is basically 100% of the time for me.) It seems like that would be a case where mosh would be much smoother...

You can use 'screen -x' to attach multiple times to the same session.