Recording VNC Session

Sometimes it’s handy to record a VNC session. For example when the remote machine is running an automated browser test and you want to see what exactly happened when a failure occurred.

pyvnc2swf can record a VNC session and save it as a Flash file.

1. Install pyvnc2swf

Fedora:

yum install pyvnc2swf

Ubuntu:

apt-get install pyvnc2swf

2. You can use pyvnc2swf via its GUI or on the command line. Using the GUI is pretty straight forward.
The remaining steps describe using it from the command line.
3. Start pyvnc2swf on the command line with the following command:

pyvnc2swf -n -t shape -o <Name of file to save recording> <VNC server name>

For example:

pyvnc2swf -n -t shape -o myrecording.swf vncserver.com

The meaning of each options are:
-n Run pyvnc2swf in console mode.
-t The encoding type. The possible types are shape (.swf), video (.flv), vnc (VNCLog).
-o The name of the file to save the recording.

4. Press Ctrl+c to stop recording.
5. Open myrecording.html in a web browser to view the recording.

2 thoughts on “Recording VNC Session”

  1. Good to know, Tony! How practical is this technique? In particular, if I want to record an hour of VNC time, how much disk space do I need? Will standard players handle an .swf file of this size and can I jump around within it easily to find the failing test?

  2. @dsquirrel A 1 minute recording is 2.1MB in size. This is with the default shape encoding type and at 12 frames per second. It is possible to reduce the file size by tuning various options.

    The generated HTML file provides a slider bar to jump around the recording.

Leave a Reply

Your email address will not be published. Required fields are marked *