[Gllug] Disconnected ssh sessions and pseudo-terminals

Pancro pancro at gmail.com
Tue Oct 28 11:33:08 UTC 2008


> And hopelessly tried 'screen' to get to the orphan terminal :(
>
> Any ideas?

Screen is not useful after the processes you want to "protect" have
started in the terminal.

If you start screen as soon as you ssh into your host and run your
processes from there, you will be able to reattach to the session
without problems. I do it routinely at work to have my mutt and irssi
sessions always on an internal server and then I attach to my email
and IRC from wherever I am, from home, from my laptop, when
travelling, etc.

The commands I use the most are:

"screen" (obviously) to start a new session
"screen -dr" to attach to a running session (detaching it from
somewhere else if needed)
Ctrl-a followed by A to give a name to the window
Ctrl-a followed by d to detach the session and keep my processes running
Ctrl-a followed by c to create a new window within the current screen session
Ctrl-a followed by p to move to the previous window in the screen session
Ctrl-a followed by n to move to the next window in the screen session
Ctrl-a followed by a to send ^A to the process (e.g. go to the
beginning of the line in many cases)

I'm a fairly basic screen user and the commands above do all I need,
many more are available and documented in the usual places.

ezio
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list