LinuxCommandLibrary

scriptlive

Replay interactive terminal sessions

TLDR

Execute a typescript in real-time

$ scriptlive [path/to/timing_file] [path/to/typescript]
copy

Execute a typescript at double the original speed
$ scriptlive [path/to/timing_file] [path/to/typescript] --divisor 2
copy

Execute a typescript created using --log-in option of script
$ scriptlive --log-in [path/to/stdin_log_file] [path/to/typescript]
copy

Execute a typescript waiting at most 2 seconds between each command
$ scriptlive [path/to/timing_file] [path/to/typescript] --maxdelay 2
copy

SYNOPSIS

scriptlive [options] [file]

PARAMETERS

-h, --help
    Display help information.

-o , --output
    Specify the output file for the recording. If omitted, output is usually to typescript file.

-t
    Specify the timing file for the recording.

-p , --program
    Run specified program.

-a, --append
    Append the output to existing file.

DESCRIPTION

The scriptlive command is a powerful tool for recording terminal sessions and broadcasting them live to viewers. It essentially combines the functionality of script (for recording terminal output) with the ability to stream that output in real-time using standard web technologies. This makes it suitable for demonstrations, tutorials, remote assistance, or even simply recording your own work for later review.

The command operates by capturing all terminal I/O (input and output) and piping it to a web server (typically using something like nc or socat). Viewers can then connect to this web server using a web browser to see the recorded session unfold in real-time. The scriptlive command typically requires additional configuration to set up the streaming server and client-side viewing mechanism.

CAVEATS

The command typically requires setting up a web server (often using netcat or socat) to broadcast the recorded session. The exact configuration may vary depending on the specific implementation or distribution. There is no 'standard' scriptlive and implementation differs between different distributions.

IMPLEMENTATION NOTES

The specific implementation of scriptlive can vary. The basic idea is to use script to record terminal output and then pipe this output to a web server (using tools like netcat or socat) so that it can be viewed live in a browser. Due to this variation, specific command-line options and configuration steps can differ.

SECURITY CONSIDERATIONS

When streaming terminal sessions live, be mindful of sensitive information that might be displayed on the screen (e.g., passwords, API keys). Take appropriate security measures to protect this data. Consider using secure connection methods like TLS/SSL for the streaming server.

SEE ALSO

script(1), netcat(1), socat(1)

Copied to clipboard