Xvnc Plugin

Plugin Information

Plugin ID xvnc
Latest Release 1.13-h-1
Latest Release Date Apr 26, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin lets you run an Xvnc session during a build. This is handy if your build includes UI testing that needs a display available.

Each build using the plugin gets its own display allocated from a free list, by default starting with :10.
(The $DISPLAY environment variable is set for the build by the plugin.)
Thus you can freely run builds on multiple executors without fear of interference.

If there is some problem starting a display server with a given number, that number will be blacklisted
for the remainder of the Hudson session and the plugin will try a couple more times before giving up.
This is commonly due to stale locks that did not get cleaned up properly.
There is also an option to clean up locks when starting the first Xvnc-enabled build in a given session.

Note: you must have started the vncserver at least one time before you use it with hudson. This is to create a password. Otherwise hudson fails.

Version History

Version 1.10 (Jul 19 2010)

  • issue #3285 Option to clean up stale locks & processes.
  • issue #3680 Do not run vncserver -kill in workspace directory.

Version 1.9 (Jun 21 2010)

  • Added a mechanism to exclude Xvnc execution on specific nodes
  • Added an option to skip Xvnc execution on all Windows machines

Version 1.8 (Jan 9 2010)

  • Ensure screenshot is taken when selected
  • Update code for more recent Hudson

Version 1.7 (Apr 15 2009)

  • Retry several times before giving up on attempt to get a display, blacklisting displays each time.

Version 1.6 (Apr 14 2009)

  • If the user forgot to put :$DISPLAY_NUMBER in the command line, issue a warning (report)
  • Better help.
  • Updated to new form validation style.

Version 1.5 (August 11, 2008)

  • Can be configured to take a screenshot of the X session upon build completion. These screenshots are treated as build artifacts. This functionality requires Imagemagick

Version 1.4

  • Updated to work with the latest Hudson patch

Labels:

plugin-buildwrapper plugin-buildwrapper Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Sep 29, 2010

    Matthias Kraft says:

    More or less a note to self. Possible obstacles: When running Hudson from init...

    More or less a note to self. Possible obstacles:

    • When running Hudson from init-scripts the environment might not be set up for vncserver to succeed. To not interfere with other tools, I resorted to specify the Xvnc Plugin's Command line option like this: sh -c "USER=hudson HOME=/var/lib/hudson vncserver :$DISPLAY_NUMBER -geometry 1024x768 -depth 16"
    • Although anything seems to work now the X11 clients still cannot connect. Edit ~hudson/.vnc/xstartup and insert a new line: xhost +
      Note: This will grant every X11 client access to the display!
    • If twm is the window manager of choice, make sure to have a file ~hudson/.twmrc which contains at least one line: RandomPlacement
  2. Aug 17, 2011

    alien11689@gmail.com says:

    I have a problem with this plugin on my miniUbuntu without any X server when I w...

    I have a problem with this plugin on my miniUbuntu without any X server when I want to test my application with webdriver.
    I have set command line like 'sh -c "USER=hudson HOME=/var/lib/hudson vncserver :$DISPLAY_NUMBER -geometry 1024x768 -depth 16"' in hudson configuration.
    In project configuration I have checked 'Run Xvnc during build'.
    I have installed vnc4server, twm, xinetd and even xfonts-scalable. I have used vncpasswd as hudson.
    My vnc log look like this:

    Xvnc Free Edition 4.1.1 - built Apr  9 2010 15:59:33
    Copyright (C) 2002-2005 RealVNC Ltd.
    See http://www.realvnc.com for information on VNC.
    Underlying X server release 40300000, The XFree86 Project, Inc
    
    
    Thu Aug  4 12:38:03 2011
     vncext:      VNC extension running!
     vncext:      Listening for VNC connections on port 5910
     vncext:      created VNC server for screen 0
    error opening security policy file /etc/X11/xserver/SecurityPolicy
    Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
    Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
    Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
    Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
    Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
    access control disabled, clients can connect from any host
    XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":10"^M
          after 148 requests (121 known processed) with 0 events remaining.^M
    xterm:  fatal IO error 11 (Zasoby chwilowo niedostępne) or KillClient on X server ":10"^M
    XIO:  fatal IO error 11 (Zasoby chwilowo niedostępne) on X server ":10"^M
          after 1950 requests (1928 known processed) with 0 events remaining.^M
    

    and my xstartup look like this:

    #!/bin/sh
    
    # Uncomment the following two lines for normal desktop:
    # unset SESSION_MANAGER
    # exec /etc/X11/xinit/xinitrc
    xhost +
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    x-window-manager &
    

    JUnit generates error:

    Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: *** LOG addons.xpi: startup *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous1661226949759314906webdriver-profile/extensions/webdriver-staging *** LOG addons.xpi: checkForChanges *** LOG addons.xpi: No changes found System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.38-8-generic', java.version: '1.6.0_22' Driver info: driver.version: FirefoxDriver
    
    org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
    *** LOG addons.xpi: startup
    *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous1661226949759314906webdriver-profile/extensions/webdriver-staging
    *** LOG addons.xpi: checkForChanges
    *** LOG addons.xpi: No changes found
    
    System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.38-8-generic', java.version: '1.6.0_22'
    Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:142)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:77)
    at tests.fngui.FNGUITest.setUp(FNGUITest.java:29)
    Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
    N/A
    
    java.lang.NullPointerException
    at tests.fngui.FNGUITest.tearDown(FNGUITest.java:870)
    

    ========================

    Please, help me resolve this problem.

    **************************
    Fixed.
    Do not use twm as WindowManager. Better is to use Fluxbox.