Introduction
I currently have to teach someone how to use the Linux shell (bash). I have to do it remotely.
The obvious first step is to create a sandbox virtual machine running Linux and create accounts for them on it. I have a backup of the VM so they can freely make a mess if they want to.
But to guide them, I need to have a way to see what they are inputting and what they did input. I could use videoconferencing with screen sharing. But I like letting them do most of the work, so they spend a lot of time looking for info and thinking hard by themselves. So videoconferencing with them all the time would be a waste of my time. Also videoconferencing doesn’t allow me to see what they previously inputted.
The following is a way to monitor a student in whom you have some basic trust. It’s not meant as a monitoring method for security or regulatory reasons. Also beware that depending on the laws where you live, you may or may not have to tell your student(s) about this monitoring, and they may or may not decline it.
Enter ttyrec and ttyplay
ttyrec
is a tool to record activity in a terminal. ttyplay
is a tool to
play those recordings. ttyplay
can also monitor and play live a recording
(ttyplay -p
).
Recording
We need a place to store the recordings. It’s probably a bad idea to store them in the student’s home directory, as they could delete it accidentally too easily. So:
|
|
Since we have some basic level of trust in our students, we can simply hook up
ttyrec
in their .bashrc
(or .zshrc
):
|
|
Playing back
|
|
Monitoring
|
|