News for hackers. Stuff that matters.
Re:Mosh: A replacement for SSH by sagichmal on Monday September 01, 2014 @06:54AM (#8252302)

    > you could just add a "/bin/screen -DR; exit" to your 
    > remote .bashrc and the screen integration would be 
    > completely invisible after the initial instantiation.
The problem is making all of those initial instantiations every time my connection is interrupted.
Re:Mosh: A replacement for SSH by pseudonym on Monday September 01, 2014 @07:24AM (#8252369)
You only make the initial instantiation once.

- SSH to remote

- on remote, run "screen"

- get disconnected from remote

- SSH to remote, .bashrc runs "screen -DR" and you resume from where you left off

You only have to create the initial screen session once, and it persists until you explicitly shut it down or restart the remote machine.

Re:Mosh: A replacement for SSH by colomon on Monday September 01, 2014 @08:06AM (#8252448)
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...)

Re:Mosh: A replacement for SSH by dedward on Monday September 01, 2014 @10:31AM (#8253000)
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.

Re:Mosh: A replacement for SSH by colomon on Monday September 01, 2014 @01:41PM (#8253939)
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.)
Re:Mosh: A replacement for SSH by slavik81 on Monday September 01, 2014 @03:25PM (#8254326)
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.
Re:Mosh: A replacement for SSH by bshimmin on Monday September 01, 2014 @08:29AM (#8252512)
The detach/reattach functionality has always been a part of screen. It's called "multiplexing" (whence tmux gets its name).
Re:Mosh: A replacement for SSH by xorcist on Monday September 01, 2014 @04:23PM (#8254537)
> 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).

Re:Mosh: A replacement for SSH by andreasvc on Monday September 01, 2014 @11:51AM (#8253409)
> 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.

Re:Mosh: A replacement for SSH by sagichmal on Monday September 01, 2014 @09:37AM (#8252733)
With mosh, I don't have to SSH to remote after I'm disconnected. That's what I was referring to.