# Session Recording and Playback

![](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2FOQbErLi876wMiioXT7IP%2FSession%20Recording.png?alt=media\&token=16ba19ad-d2e8-4e59-aa13-af398b1975be)

## Overview

Keeper Connection Manager supports automatic screen recording of each connection session. Recordings can be graphical video recordings of the connection, or (for certain connection protocols) typescript recordings which record only the text sent to the the client machine.

Read below about how to setup, configure, and view each session recording type.

## **Graphical Session Recording**

Sessions of all supported protocols can be recorded graphically. These recordings take the form of Guacamole protocol dumps and are recorded automatically to a specified directory.

### **In-Browser Session Recording and Playback**

The simplest way to record user connection sessions and view them in the browser.

To configure connections for in-browser recording playback, enter the following special values in the "Screen Recording" section of the connection settings.

![Configuration for Screen Recording and Typescript Recording](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2F29bCuoT97XACAwIZkhI4%2FScreen%20Shot%202022-04-29%20at%2010.28.42%20AM.png?alt=media\&token=4b7231b6-3f13-42b6-9abd-d78d0de0f8f2)

**Recording Path / Typescript Path**

{% code title="Recording Path Options" %}

```
${HISTORY_PATH}/${HISTORY_UUID}
```

{% endcode %}

These values tell the system to store recordings in a location and format that the in-browser viewer can play back.

### **Custom Session Recording Location and Local Playback**

If desired, graphical session recordings can be named with custom values, or saved to any desired location. This will require recording playback using the **Glyptodon Session Recording Player.**

#### Configuring Graphical Session Recording

![Graphical screen recording options](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2FmB1QOfp6VMQkLLowZRql%2Fimage.png?alt=media\&token=344a3db0-2f5d-41cd-8e6c-e2aa90c4788e)

#### Recording Path

The directory in which screen recording files should be created.

This parameter is required for graphical session recording to function.

#### Recording Name

The filename to use for any created recordings. *This parameter is optional.* If omitted, the value “recording” will be used instead.

This parameter only has an effect if graphical recording is enabled. If the "Recording Path" is not specified, graphical session recording will be disabled, and this parameter will be ignored.

It is recommended to utilize [Keeper Connection Manager's dynamic credential pass-through](https://docs.keeper.io/kcm-linux-rpm-method/using-keeper-connection-manager/credential-pass-through) to add the date, time, and other unique information to the recording name.

For example:

`RDP Recording ${GUAC_USERNAME} - ${GUAC_DATE} : ${GUAC_TIME}`

Will create recording files with the user's username, the session date and time in the name.

{% hint style="warning" %}
Keeper will never overwrite an existing recording. If necessary, a numeric suffix like “.1”, “.2”, “.3”, etc. will be appended to to avoid overwriting an existing recording. If even appending a numeric suffix does not help, the session will simply not be recorded.
{% endhint %}

#### Session Recording Playback

![The History tab](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2F1CwOJOdOTCqJ5GyRWZ1Z%2Fhistory%20tab.png?alt=media\&token=df706a4e-1bda-4670-b506-0f457ba21d62)

Keeper Connection Manager session recordings can be viewed from within the user interface in the History tab of the settings screen.\
\
To view a recording, click the play icon on the far right. Any session of a connection that was setup with the settings above will have the icon.\
\
When the icon is clicked, the recorded session will load in the browser, and you can start playback by clicking anywhere on the screen.

Note: For a recording to be visible within the UI, it must satisfy one of the following criteria:

* The recording is directly within the directory `${HISTORY_PATH}` and has the filename `${HISTORY_UUID}`.
* The recording is directly within the directory `${HISTORY_PATH}/${HISTORY_UUID}` (and may have any filename).

#### Key Events in Session Recordings

If a session recording contains key events, those events can now be viewed within KCM’s session recording player. Administrators can view an approximation of what would have been typed based on those events and perform a text-based search to find particularly interesting parts of a recording.

{% hint style="warning" %}
By Default, recordings do not contain key events. This must be enabled by an administrator when configuring the connection.
{% endhint %}

#### Histograms on Session Recording

KCM session recordings display a histogram that shows the relative levels of activity within different parts of the recordings. The histogram shows the following levels of activities:

* Visible events such as when the screen changes
* keyboard events - user interactions with the keyboard

<figure><img src="https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2FWzMwZ4Cj8msihltztfdC%2Fkcm_histogram.png?alt=media&#x26;token=4b4803b7-d3d8-40de-991b-314f5e51f5b2" alt=""><figcaption><p>KCM Session Recording Histogram</p></figcaption></figure>

#### Exclude Graphics/Streams

If checked, graphical output and other data normally streamed from server to client will be excluded from the recording, producing a recording which contains only user input events.

*This parameter is optional.* If omitted, graphical output will be included in the recording.

#### Exclude Mouse

If checked, user mouse events will be excluded from the recording, producing a recording which lacks a visible mouse cursor.

*This parameter is optional.* If omitted, mouse events will be included in the recording.

#### Include Key Events

If checked, user key events will be included in the recording.

*This parameter is optional.* If omitted, key events will be not included in the recording.

#### Automatically Create Recording Path

If checked the directory specified by "Recording Path" will automatically be created if it does not yet exist. Only the final directory in the path will be created - if other directories earlier in the path do not exist, automatic creation will fail, and an error will be logged.

*This parameter is optional.* By default, the directory specified by the recording path parameter will not automatically be created, and attempts to create recordings within a non-existent directory will be logged as errors.

#### Replaying Custom Location Graphical Session Recordings

Keeper Connection Manager graphical session recordings that were saved to a custom location can be viewed using the Keeper Connection Manager Session Recording Player at <https://player.glyptodon.com>

![The Keeper Connection Manager graphics session recording player](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2FnHemVss1fNEbviLbaIu4%2FScreen%20Shot%202022-01-31%20at%209.49.47%20AM.png?alt=media\&token=558c017b-b566-46d0-88f4-b410f5a10eef)

To view session recordings, click "Browse..." and select the recording in your file system. The recording will play in the browser.

{% hint style="success" %}
The Keeper Connection Manager graphical session recording player does not send recordings over the internet. Recording files are translated to video locally on the browser.
{% endhint %}

## **Text session recording (typescripts)**

The full, raw text content of terminal sessions, including timing information, can be recorded automatically to a specified directory. This recording, also known as a “typescript”, will be written to two files within the directory specified by the entered Typescript Path: *`NAME`*, which contains the raw text data, and *`NAME`*`.timing`, which contains timing information, where `NAME` is the value provided for Typescript Name.

This format is compatible with the format used by the standard UNIX **script** command, and can be replayed using compatible tools.

### Configuring Typescript Session Recording

Typescript session recording can be configured for each connection in the [Keeper Connection Manager connection settings](https://docs.keeper.io/kcm-linux-rpm-method/using-keeper-connection-manager/creating-connections)

![Typescript recording options](https://3357255970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb7weUpu7VBcMnESSH8vG%2Fuploads%2FUAnze4uVaAjI0h8peWH5%2Fimage.png?alt=media\&token=b9aad6b2-ed6e-44ff-afe1-6218d2906ea1)

#### Typescript Path

The directory in which typescript files should be created.

*This parameter is required.* Specifying this parameter enables typescript recording. If this parameter is omitted, no typescript will be recorded.

#### Typescript Name

The base filename to use when determining the names for the data and timing files of the typescript.

*This parameter is optional.* If omitted, the value “typescript” will be used instead.

Each typescript consists of two files which are created within the directory specified by the Typescript Name: *`NAME`*, which contains the raw text data, and *`NAME`*`.timing`, which contains timing information, where `NAME` is the value provided for the Typescript Name parameter.

It is recommended to utilize [Keeper Connection Manager's dynamic credential pass-through](https://docs.keeper.io/kcm-linux-rpm-method/using-keeper-connection-manager/credential-pass-through) to add the date, time, and other unique information to the recording name.

For example:

`SSH Typescript ${GUAC_USERNAME} - ${GUAC_DATE} : ${GUAC_TIME}`

Will create recording files with the user's username, the session date and time in the name.

{% hint style="warning" %}
Guacamole will never overwrite an existing recording. If necessary, a numeric suffix like “.1”, “.2”, “.3”, etc. will be appended to `NAME` to avoid overwriting an existing recording. If even appending a numeric suffix does not help, the session will simply not be recorded.
{% endhint %}

#### Automatically Create Typescript Path

If checked, the directory specified by "Typescript Path" will automatically be created if it does not yet exist. Only the final directory in the path will be created - if other directories earlier in the path do not exist, automatic creation will fail, and an error will be logged.

*This parameter is optional.* By default, the directory specified by "Typescript Path" will not automatically be created, and attempts to record typescripts in a non-existent directory will be logged as errors.

### Replaying Text Session Replays

#### MacOs

Recordings can be replayed using **script**. For example, to replay a typescript called “`NAME`”, you would run:

```
$ script -p NAME
```

#### Linux

Recordings can be replayed using **scriptreplay**. For example, to replay a typescript called “`NAME`”, you would run:

```
$ scriptreplay NAME.timing NAME
```
