JP Vossen on 20 Feb 2012 22:48:03 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] GNU Screen follow-up

Thanks to Gary for the very interesting PLUG W talk on GNU screen. Screen is one of those programs that is absolutely essential, yet many people don't know it exists and when they find it, they learn 5-10% of the features and that's it. I don't even know how many years I've used it (8-10 at least), yet I still learned a bunch from the talk.

See also:

Some other things to look into, if you like screen: "is intended to be a modern, BSD-licensed alternative to programs such as GNU screen."

I talked about multi-user 'screen' as a great training or t-shooting aid, but there are some hoops you have to jump through first.

* /tmp/screens or /tmp/uscreens must exist and be world readable and executable. (Fix: mkdir -m 1755 /tmp/screens as root) * The screen binary must be SUID root so it can write to the appropriate user dev pseudo terminals (tty) for multiuser mode. If screen doesn't work, especially in multiuser mode, this is a likely reason why. (Fix: chmod u+s /usr/bin/screen as root) * Screen versions from 3.9.15-8 to 4.0.1-1 from Red Hat (i.e. RHEL3) are totally broken and should not be used if you actually want multiuser mode to work. 4.0.2-5 or later should work. works even on RHEL3, though once you start using the new screen, existing screen sockets in $HOME/.screen are not found and thus orphaned and unusable. Log out of all sessions, and use the new version to create new sockets in /tmp/screens/S-$USER', then remove the $HOME/.screen directory.

Multi User/Training

Based on simplifications and corrections to the page that used to exist here:

1) As the "host"
    1 screen -S {name of session, no spaces}, e.g. screen -S training
    2 Turn on multi-user mode: CTRL-a:multiuser on
3 CTRL-a:addacl {usernames} of accounts (comma delimited, no spaces!) which may access the display. Note this allows full read/write access! E.g. CTRL-a:addacl alice,bob,carl 4 Use the CTRL-a:chacl {usernames} {permbits} {list} command to refine permissions if needed.
2) As the "viewer"
1 Use screen -x {user}/{name} to connect to a shared screen, e.g. screen -x jp/training
    2 CTRL-aK<code> to kill the window and end the session.

Note that 1.2 and/or 1.3 can easily be added to your ~/.screenrc file, if you use them a lot. But at least 1.3 can also be a security leak, since it allows these other uses to see what you're doing.

Finally, a bit OT, but we talked about it at dinner, this is fascinating reading: Fred, according to Wikipedia: "Initial release June 19, 1996" so our mid-1990s guess was right.

JP Vossen, CISSP            |:::======|
My Account, My Opinions     |=========|
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --