Over the last couple of weeks I've been learning about Cockpit internals, and
hacked together a little proof-of-concept page listing and playing back user
sessions recorded with tlog . Here is a little demo of it I recorded:
And here's the code:
The POC has absolutely minimal functionality and is not pretty, but it proves
we can record sessions to systemd journal, and list them and play them back.
Tlog-rec-session (a part of tlog) logs a recording as a series of messages,
with several extra journal fields attached to allow for filtering all or
specific recorded sessions from the rest of the journal log. Cockpit goes
through journal extracting all tlog messages to collate a session list. When
asked to playback a session, it starts tlog-play (another part of tlog) on the
host, specifying how to extract session messages, connects it to a terminal
emulator in the browser, and lets it play.
Next, me and Kyrill are going to work on verifying we can implement the rest
of the required core functionality  with this approach, learn more about
Cockpit, and prepare a design as required by Cockpit team . We will also
see if we can make this into an out-of-tree package for Cockpit.
We would appreciate any comments you might have, be it on the architecture,
the code, or the way you think it should look!
 Tlog - Terminal I/O logger
 User Stories for Session Recording Playback
 Hacking on Cockpit - Contributing a Change