Multiuser GNU screen sessions I am attempting to set up multi user screen sessions on Mac OS 10.7.3 and I run into the error Attach attempt with invalid pid(xxx)!.

If set it up as follows:

Initial configuration of system:

Make the proper permisions for the screen command

sudo chmod u+s $(which screen)
sudo mkdir /var/run/screen/
sudo chmod 755 /var/run/screen/


Screen setup

From &lt;user_sharing_screen&gt;

Initialize the screen with specified session name:

screen -S &lt;session_name&gt;


Make the screen multiuser: 

C-a :multiuser on
C-a :acladd &lt;user_to_share_with&gt;


From &lt;user_to_share_with&gt; on the same system connect to the shared screen

screen -x &lt;user_sharing_screen&gt;/&lt;session_name&gt;


Then I get the error message Attach attempt with invalid pid(xxx)!
[Update]The screen utility is broken according to a superuser.com post starting from Mac OS X 10.6.

I was able to compile a working version of screen from MacPorts.org. If you're familiar with MacPorts I could provide you with an updated screen x86_64 binary or the source code patch file (changing one line in socket.c).[/Update]

Update2 Add diff of socket.c

--- screen-4.0.3/socket.c   2003-09-08 16:26:50.000000000 +0200
+++ /Users/fluffy/screen-4.0.3/socket.c 2012-03-10 22:58:57.000000000 +0100
@@ -745,7 +745,7 @@
   if (eff_uid == real_uid)
     return kill(pid, 0);
   if (UserContext() &gt; 0)
-    UserReturn(kill(pid, 0));
+    return 0;
   return UserStatus();
 }