Record VNC sessions using vnclog
mainThe vnclog tool acts as a man-in-the-middle to record VNC commands from a client session into a playable script (.vdo file). This is useful for creating automation scripts by recording manual actions.
Workflow
- Setup:
vncviewer$\rightarrow$vnclog$\rightarrow$vncserver. - Recording: Use
vnclogto intercept the connection. - Playback: Use
vncdoto play back the recorded.vdofile.
Note: For best results, configure your vncviewer client to use RAW encoding, as other encodings may not be fully supported.
Recording Modes
- Standard: Launch
vnclogand then connect your viewer to the port provided. - Forever Mode: Use the
--foreverflag to makevncloglisten continuously. It will create a new.vdofile for every new client connection, which is ideal for recording multiple test cases.
# Quick start: record a session directly
vnclog --viewer vncviewer keylog.vdo
# Manual control: launch logger, then connect viewer separately
vnclog keylog.vdo
vncviewer localhost:2
# Continuous recording: listen on port 6000 and save files to /tmp
vnclog --forever --listen 6000 /tmp