
Stop Using Terminal Command-Line Switches #50
Chapter 7, Terminal Empowerment
|
163
HACK
Now you are sharing your screen session; go ahead, try it from multiple
shells. You can attach as many sessions as you want, but when you exit the
application (assuming you launched the application directly like you did for
irssi, not from a screen shell), that screen terminates.
It’s Good to Share
It is also possible for multiple users to access a single screen instance—e.g.,
to collaborate on a document or some code. For this to work, the following
must apply:
• screen must be compiled with “multiuser” enabled (most packages are).
• screen must be suid root (
chmod +s /usr/bin/screen).
To do this as
user1 and assuming screen is running, press Ctrl-A and then
type
:multiuser on. Still as user1, press Ctrl-A and then type :acladd
username
, where username is the user you want to be able to access your
screen. For this example, use
user2.
As
user2, launch screen with:
foo@bar:~$ screen -x user1/
At this point you should be connected to user1’s screen. Besides acladd, you
also have the
aclchg, acldel, and aclgrp commands for controlling who can
access your screen, and what they can do (e.g., you can make them read-
only). To see who’s connected to your session press Ctrl-A. Then press the
asterisk (*) key.
To prevent people from (temporarily) editing all your windows, press Ctrl-A
and then type
:writelock on to lock editing