preload
Dez 08

To detach from an actual session press

1
Ctrl+a d

Reattach with

1
screen  -r

To list the actual detached sessions:

1
screen  -list

You will see something like:

1
2
4840.pts-3.localhost  (Detached)
4628.pts-1.localhost (Detached)

Reattach it with:

1
screen  -r 4840.pts-3.localhost

To share a session with another user you have to ensure some steps.

Set the screen binary setuid root:

1
chmod  +s /usr/bin/screen

Login as root and start a screen session and name it:

1
screen -S sessionName

Enable multi-user access function by pressing Ctrl+a then :multiuser on (to type “:”, press “shift+;”)
Grant permissions to the second user by pressing Ctrl+a: acladd username, where username is the Unix user for the second user.

1
screen  -x root/sessionName

Activate logging with:

1
Ctrl+a H

A file in your home directory will be created. Something like $HOME/screenlog.1

Type exit to exit screen.

Leave a Reply

You must be logged in to post a comment.