Community
Participate
Working Groups
In order to wrap UI tests within a single xvnc UI thread, Hudson needs to be able to start vncserver before a build, then take it down when done. I'm guessing the hudson user doesn't have permission to run vncserver? I guess all we need here is that root sudo's to hudson, runs `vncserver :10` to set an initial vncserver password, and then kills that session (`vncserver -kill :10`). Once the password is set, everyone should be able to create/destroy sessions as part of builds. Starting xvnc [workspace] $ vncserver :10 vncserver: Could not create /root/.vnc. FATAL: Failed to run 'vncserver :10' (exit code 13), blacklisting display #10; consider adding to your Hudson launch script: killall Xvnc; rm -fv /tmp/.X*-lock /tmp/.X11-unix/X* java.io.IOException: Failed to run 'vncserver :10' (exit code 13), blacklisting display #10; consider adding to your Hudson launch script: killall Xvnc; rm -fv /tmp/.X*-lock /tmp/.X11-unix/X* at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:61) at hudson.model.Build$RunnerImpl.doRun(Build.java:131) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:269) at hudson.model.Run.run(Run.java:865) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:113) The only caveat here is that the sessions will all share the same password, which means it should be kept secret. Should a session get stuck (eg., a runaway UI test waiting for a modal dialog), processes can be killed by request of the webmaster (either as root via kill / pkill, or by connecting to the vnc session and killing the process as hudson).
Is this somehow related to bug 265750? Should I just restart Hudson as proposed there?
(In reply to comment #1) > Is this somehow related to bug 265750? Should I just restart Hudson as > proposed there? Well, they're related. You don't want vnc running as root or people would be able to connect as root. So, yes, Hudson has to run as hudsonbuild, and hudsonbuild needs to set up its ~/.vnc* stuff so that a password is assigned for vnc connections.
This was related to bug 265750, the $HOME variable was not set correctly(inherited the root value), so it couldn't create the needed files. I've corrected that and with Nicks help have been able to at least get xvnc started. -M.