Copy Unix Terminal to Terminal in Real Time

How can you dump someone else's terminal to yours?

The problem:
Your client, a developer, Peter is at a remote place. Peter wants you to install some packages for him as root on his Unix server. You need to know the options/choices when installing the packages and Peter needs to see the actual installation progress on your screen before he can tell you what options to use.

The solutions:
1. Like most "Unix SAs" do, have Peter on the phone and tell him what's on the screen during the installation...

OR, do it the Unix way
2. Copy your screen output to Peter's terminal:

a. Peter and you both login the same server,

b. Ask Peter type "tty" to find out his pts number:
Peter@server-d1:/home/peter # tty

/dev/pts/3

(or you can use command 'w' or 'who' to see a list of pts/x)

c. He's on pts/3. To dump you terminal output to Peter's, type:
#script -a /dev/null | tee /dev/pts/3

Now, start installation, Peter will be surprised to see what's on his screen...

When you're done, Ctrl D to stop script.

Bonus tasks:

1. To record screen output into a file, replace "/dev/null" with a filename.

2. Spying someone's unix activity:
AIX and linux -q option to run it quietly. Put the script command in someone's .profile or .kshrc to redirect his tty to yours or log it in a logfile to spy the user's activity.

3. You want to show 5 remote users how to troubleshoot Oracle database problem on a production server. No one have access to the production server except you and you have access to users Unix workstations. Use the above trick to temporarily propagate your terminal to 5 different users on 5 different workstations... (Hint, ssh is your best friend!)