sshgnu-screen

Is it possible to look at the contents of a screen session without attaching to it?


Is it possible to peek at the contents of a running screen session?

In order words, look through the window without going in to the room!

e.g.

ssh user@remote.server screen --look (and show me what's happening)

I suppose a bit like a quick attach and detach in one go while using SSH.

Do you follow me?


Solution

  • screen -x
    

    Attach to a not detached screen session. (Multi display mode). Screen refuses to attach from within it‐ self. But when cascading multiple screens, loops are not detected; take care.

    You could combine it with -X hardcopy option

    screen -x -X hardcopy /tmp/hardcopy.txt