Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View VncRecorder on the plugin site for more information.

This plugin records screen of current build or other configured VNC session as Shock Wave Flash (swf) file during a build and stores it as an artifact. This plugin can be used in combination with VncViewer and Xvnc plugin.

After the build, the video file gets also published as a HTTP link in the "Console output" of the build. The generated HTML file embeds a video and makes it possible to navigate within a recorded video directly in browser.


  • Linux on Jenkins master node
  • vnc2swf on Jenkins master node

How you use the plugin in a job

Example for usage together with Xvnc plugin

Result: video in your Browser

Link in "Console output"

Store as build artifact

The generated HTML file MyTest_2.html embeds video MyTest_2.swf and makes it possible to navigate within a video directly in browser.

Path of vnc2swf

Path of used vnc2swf can be customized under "Jenkins System configuration / Global settings". Default is the vnc2swf found in the PATH variable.

JIRA issues

T Key Summary Assignee Reporter P Status Resolution Created Updated Due


  1. Unknown User (mwoi)

    Nice plugin, thanks for this opportunity.

    But i have a question: Is it possible to use the $DISPLAY system variable that's given by the Xvnc plugin? The build is running on a slave, so not on the master. When i setup the VNC server to myserver:$DISPLAY an error is thrown:  

    ERROR pool-14-thread-9 Command: vnc2swf, -o, /var/lib/jenkins/jobs/MyJob/builds/2014-09-16_17-35-26/archive/MyJob.swf, -P, /var/lib/jenkins/.vnc/passwd, -t, swf5, -n, -e, 0, myserver:$DISPLAY returned: 1, trying 2 from 50

    Because of the use of the Xvnc plugin it's not possible to define the DISPLAY variable before.

    1. Unknown User (tbaum)

      It's a problem of plugin ordering control. Xvnc was called AFTER vncrecorder, this is the reason why vncrecorder didn't get DISPLAY variable set by Xvnc plugin.
      I set ordinal of vncrecorder lower than ordinal of Xvnc plugin and it works now.
      See http://javadoc.jenkins-ci.org/hudson/Extension.html#ordinal for more info.

      Try it again with vncrecorder release 1.8 and set "myserver$DISPLAY" instead of "myserver:$DISPLAY" as "VNC server"  because ":" is already part of $DISPLAY env. variable.

      1. Unknown User (mwoi)

        Now the combination with the Xvnc plugin works correctly. Thank you!

        1. Unknown User (tbaum)

          You are welcome!

      2. Unknown User (chhung)


        How can I set ordinal of vncrecoreder.

        1. Unknown User (tbaum)

          It isn't configurable now. What is your reason for that - any additional dependencies?

          1. Unknown User (chhung)

            I'm using xvfb and xvnc in automated UI testing and I wanna record all activity in the test (especially failure case)

            But when I used vncrecorder, I got  the same issue as Martin Woit, It's meaning my jenkins didn't start xvnc when I combined xvnc with vncrecorder...

            1. Unknown User (tbaum)

              The issue of Martin was a problem of plugin start order: Xvnc started after VncRecorder, but Xvnc was started anyway.. Start order issue is already fixed, ordinal of VncRecorder was set lower than ordinal of Xvnc (-1) in source code of VncRecorder.

              Your problem of failed Xvnc start seems to be a new issue.  Do you have any error output of Xvnc? 

              Is your build running on the slave node? In this case, your xvnc server must run without -localhost argument (that's default setting of Xvnc plugin).  With -localhost argument your  VncRecorder can't connect vnc server on slave, because your listening vnc port is accessible for local use only.

              1. Unknown User (chhung)

                I'm running jenkins on master without any slave.

                This is my output

                 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host on port 7055 after 45000 ms. Firefox console output:

                (process:5161): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
                Error: cannot open display: localhost:89

                (process:5168): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
                Error: cannot open display: localhost:89

                This is my configuration : http://i.imgur.com/wvKYtC3.png

                Global configurations for Xnxc/Xvfb/Vncrecorder are default

                One more question : How can I record failure only case?

                1. Unknown User (tbaum)

                  I think the problem is your Xvfb / Xvnc combination.

                  Try this:

                  1. Disable your "Start Xvfb before the build.." setting
                  2. Start your job
                  3. vncrecorder should work, in other case try to connect  localhost$DISPLAY with vncviewer

                  You can't record failed tests only without crystal ball that predicts which test is going to fail :-)

                  On the other hand, configurable removing of recorded videos of successful tests makes sense - it will be a feature of the next release of vncrecorder. 

                  1. Unknown User (chhung)

                    Thank you, It run...

                    There are many test classes in my project, and there are many test cases in each test class...I wanna trigger VncRecorder for every failed test case.So, do you have any idea for this situation?

                    btw, I saw "killall xclock" in image above, did you run xclock in vncrecorder?How can I start xclock with VnC recorder? 'cause I need timestamp on recorded video.

                    1. Unknown User (tbaum)

                      You are welcome!

                      There is no possibility to record failed test only yet. Configurable removing of recorded videos of successful tests will be a feature of the next release, my hint is: wait for it..

                      Xclock in my screenshot was an example, in your case you could start xclock it before your test run.

                      This is my favored xclock call for this purpose:

                      xclock -geometry -20-10 -d -update 1 -strftime "%H:%M:%S" 2>/dev/null &

                      1. Unknown User (chhung)

                        Hello Dimitri Tenenbaum,

                        Today, when I run my job, I got new issue :2015-01-14 10:55:20,733 ERROR pool-57-thread-2 Command: /usr/bin/vnc2swf, -o, /var/lib/jenkins/jobs/MYJOB/builds/2015-01-14_10-41-54/archive/MYJOB.swf, -P, /var/lib/jenkins/.vnc/passwd, -t, swf5, -n, -e, 0, localhost:1710 returned: 1, trying 1 from 50
                        2015-01-14 10:55:20,736 ERROR pool-57-thread-2 Using pygame 1.9.1release
                        2015-01-14 10:55:20,739 ERROR pool-57-thread-2 Connected: localhost:7610, protocol_version=3.8, preferred_encoding=(0, -232, -239)
                        2015-01-14 10:55:20,740 ERROR pool-57-thread-2 VNC Screen: size=1360x768, name='ubuntu:1710 (jenkins)'
                        2015-01-14 10:55:20,741 ERROR pool-57-thread-2 Output movie size: 1360x768
                        2015-01-14 10:55:20,743 ERROR pool-57-thread-2 Creating movie: '/var/lib/jenkins/jobs/MYJOB/builds/2015-01-14_10-41-54/archive/MYJOB_25.swf': version=5, size=1360x768, framerate=12.0, compression=None
                        2015-01-14 10:55:20,749 ERROR pool-57-thread-2 Traceback (most recent call last):
                        2015-01-14 10:55:20,751 ERROR pool-57-thread-2 File "/usr/bin/vnc2swf", line 611, in <module>
                        2015-01-14 10:55:20,753 ERROR pool-57-thread-2 if _name_ == "_main_": sys.exit(main(sys.argv))
                        2015-01-14 10:55:20,754 ERROR pool-57-thread-2 File "/usr/bin/vnc2swf", line 598, in main
                        2015-01-14 10:55:20,755 ERROR pool-57-thread-2 merge=merge, debug=debug)
                        2015-01-14 10:55:20,756 ERROR pool-57-thread-2 File "/usr/bin/vnc2swf", line 427, in vnc2swf
                        2015-01-14 10:55:20,758 ERROR pool-57-thread-2 client.loop()
                        2015-01-14 10:55:20,759 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/rfb.py", line 469, in loop
                        2015-01-14 10:55:20,760 ERROR pool-57-thread-2 while self.loop1():
                        2015-01-14 10:55:20,762 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/rfb.py", line 445, in loop1
                        2015-01-14 10:55:20,763 ERROR pool-57-thread-2 self.finish_update()
                        2015-01-14 10:55:20,764 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/rfb.py", line 133, in finish_update
                        2015-01-14 10:55:20,764 ERROR pool-57-thread-2 self.fb.update_screen(time.time())
                        2015-01-14 10:55:20,765 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/rfb.py", line 818, in update_screen
                        2015-01-14 10:55:20,770 ERROR pool-57-thread-2 self.stream.next_frame()
                        2015-01-14 10:55:20,773 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/output.py", line 564, in next_frame
                        2015-01-14 10:55:20,774 ERROR pool-57-thread-2 self.add_object(self.screen.get_image(x0, y0, w, h), depth, x0, y0)
                        2015-01-14 10:55:20,778 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/output.py", line 531, in add_object
                        2015-01-14 10:55:20,779 ERROR pool-57-thread-2 self.place_object2(self.define_shape(w, h, data), x, y, depth)
                        2015-01-14 10:55:20,780 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/output.py", line 427, in define_shape
                        2015-01-14 10:55:20,782 ERROR pool-57-thread-2 shape_id = self.writer.newid()
                        2015-01-14 10:55:20,785 ERROR pool-57-thread-2 File "/usr/share/pyvnc2swf/swf.py", line 799, in newid
                        2015-01-14 10:55:20,789 ERROR pool-57-thread-2 assert self.objid < 65536, 'the number of objects exceeded the limit!'
                        2015-01-14 10:55:20,790 ERROR pool-57-thread-2 AssertionError: the number of objects exceeded the limit!

                        What is that?And how to fix it?
                        P/S : It took about 18mins to run this job.

                        1. Unknown User (tbaum)

                          Hello Hung,

                          according to google, OS update would help, see:


                          1. Unknown User (chhung)

                            Yep, thank you Dimitri...But I'm using Ubuntu 14.04.1 LTS.

                    2. Unknown User (tbaum)

                      Configurable removing of recorded videos of successful tests is ready - you can use this feature from release 1.18.

  2. Unknown User (cutang)

    Hi Dimitri,

    It's a nice plug-in.  The requirement says "Linux master node".  I do have a linux master, and my test is running on a Windows slave.  When I start the build running this Window slave with vnc recorder enabled, I got error:FATAL: Feature "Record VNC session" works only under Unix/Linux!. Is it TRUE that it doesn't work on Windows Slave, or something to be with my configuration?


    1. Unknown User (tbaum)

      Hi Cunyong,

      I checked  OS of wrong node - thank you for bug report. Fixed in release 1.21. VncRecorder runs on master only, it should work with any Slaves with working VNC server.

      By the way,  Jira is more suitable for such issues  - I have noticed your comment by pure chance ;-)

  3. Unknown User (boblloyd1981)

    Not sure what I might be doing wrong, but when I use the vncrecorder in conjunction with xvnc plugin, I don't get an .swf file to generate.  Everything else runs fine (it creates the display), however no file is generated.

    My configuration has vnc2swf installed on the Jenkins master and configured with the path (/usr/bin/vnc2swf). 

    Global Configuration:

      Command Line: vncserver :$DISPLAY_NUMBER -geometry 800x600
      Minimum display number: 10
      Maximum display number: 99
      X Skip Execution on Windows
      [] Clean up before start
      Path of vnc2swf python script: /usr/bin/vnc2swf

    Job Configuration:

    Run Xvnc during build
      [] Take Screenshot Upon Build Completion?
      X Create a dedicated Xauthority file per build?
    Record VNC session
      VNC Server: my.fqdn.to.slave$DISPLAY
      VNC password file: /home/Me/.vnc/passwd
      Base filename of output html/swf files: ${JOB_NAME}_${BUILD_NUMBER}
      [] Save disk space: Remove videos of successful builds 
      X Set DISPLAY for this build on value of 'VNC server'

    This is my log:

    Starting xvnc
    [TestJob] $ vncserver :89 -geometry 800x600
    New 'my.fqdn.to.slave:89 (builder)' desktop is my.fqdn.to.slave:89
    Starting applications specified in /home/Me/.vnc/xstartup
    Log file is /home/Me/.vnc/my.fqdn.to.slave:89.log
    Recording from vnc server: my.fqdn.to.slave:89
    Using vnc passwd file: /home/Me/.vnc/passwd
    job/TestJob/7/Recording from server: my.fqdn.to.slave:89, to: /home/Me/hudson-build/jobs/TestJob/builds/7/archive/TestJob_7.swf
    ERROR: File /home/Me/hudson-build/jobs/TestJob/builds/7/archive/TestJob_7.swf doesn't exist. 
    Feature "Record VNC session" failed!
    1. Unknown User (sbonami)

      Same problem on my side. Have you found the solution?