Saturday, February 09, 2008

Sharing a shell with screen

Email from Jacob Hoffman-Andrews, 2/8/2008 ...

Hey all,

I and several others on MFE-team have been using GNU screen for a while now to multiplex our terminals and allow attaching to them from home. It's worth checking out for that alone:
http://www.gnu.org/software/screen/.

However, one of the really cool features it has, that Gregor and I used to great effect recently, is terminal sharing. This allows someone to "watch over your shoulder" as you work within a terminal, even if they're in another office. They can even type on your terminal, although you can set permissions so they can only watch
also. This is great for collaborating or asking someone for a quick opinion on a compile error.

You'll need to make a few modifications to get screen to work this way:

$ chmod u+s /usr/bin/screen
$ chmod 755 /var/run/screen
$ screen
:multiuser on
:acladd rothfuss
$ screen -list
There is a screen on:
10544.pts-6.twisty (Multi, attached)

Then you have your collaborator run:

$ ssh yourmachine
$ screen -r jandrews/10544.pts-6.twisty

Voila! Highly useful interaction.

No comments: