Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how can I invoke zsh via screen when logged in via ssh?



* TJ Luoma (Wed, 22 Jan 2014 14:54:02 -0500)
> I had a thought today that perhaps one answer would be to use
> 'screen(1)' as my login shell for those accounts, but then I realized
> that I didn't want that to be the shell I use for local logins, just
> for SSH logins.

That's pretty much the same way I use it.
 
> I wondered if anyone had already done this, so I didn't have to
> re-invent the wheel, or might have some experience with potential
> problems that I might run into when doing this.
> 
> 
> 3) What's the 'best' way to invoke screen(1) from .zshenv ? I
> already have this:
> [...]
> 
> which would, I believe, resume an existing `screen` session if one
> existed, but would otherwise just launch `screen` anew.

Why don't you simply read the man page and invoke screen with the 
right options?! Would have saved you tons of time...

I suggest you replace all your ssh calls like "ssh user@host" with
"ssh -t user@host screen -xRR ssh". That creates a session with name 
"ssh" or connect to an already running session with that name.

Thorsten



Messages sorted by: Reverse Date, Date, Thread, Author