Sharing Your Session


I’ve been working a lot with remote people over IRC here at Mozilla. Pastebin can be your friend to share stackdumps but sometimes you need to show an interactive session. This is great if you want someone more experience to help you debug the problem in GDB for example. GNU Screen is a great terminal multiplexer but the drawback is that it requires some configuration.

How to:

Here is a simpler way to quickly share your session over a chat session. You can redirect ‘script’ to a listening port using the following command:

touch transcript; tail -f transcript & script -q -t 0 | tee transcript | nc -l 5678; rm transcript;

That’s a long and complicated command but that is the best way I have found to redirect script to both the screen and ‘nc’. Let me know if you know a better way!
To have someone watch your interactive session ask them to execute the following commands:

nc <HOSTNAME/IP> 5678


If this is useful others I could extend this to allow the person watching to interact with the session as well, however for now I can just claim that it’s a security issue!

I’d also like to extend this to work with NATs by deploying an online web app where you can request that you would like to share a session with someone and it will give you addresses to connect to and act as a connector so that two users located in different intranets can use this as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s