Sharing a screen session with another user

      1 Comment on Sharing a screen session with another user

GNU screen has builtin multiuser support that let’s you share a screen session with another user.

First, create a screen session named with an arbitrary name, e.g. ‘shared’, and attach to it:

[user1@pc ~]$ screen -S shared

To allow other users to use the session, you need to enable multiuser support (Ctrl-a :multiuser on) and add the specific user(s) you want to share your session with to the access control list (Ctrl-a :acladd user2).

If you try to attach to this session with a different user now, you might run into the following problem:

[user2@pc ~]$ screen -x user1/shared
Must run suid root for multiuser support.

To fix this, set the SUID bit on the screen binary:

[root@pc ~]# chmod u+s $(which screen)
[root@pc ~]# chmod 755 /var/run/screen

You also need to change the permissions of the /var/run/screen directory to 755, otherwise screen will complain when you create a new session.

You should be able to connect to the shared screen session now:

[user2@pc ~]$ screen -x user1/shared

If you run into chmod /dev/pts/2: Operation not permitted remember that a user is not able to manipulate the pty he is on when you run su - user (in contrast to using ssh user2@host).


One thought on “Sharing a screen session with another user

Leave a Reply

Your email address will not be published.