Xvnc plugin

841 views
Skip to first unread message

haglo

unread,
Mar 26, 2013, 9:47:19 AM3/26/13
to jenkins...@googlegroups.com
I have jenkins 1.506 under ubuntu 12.10

I start Jenkins as Standalone Server with the following command:
java -jar /lunifera/jenkins/jenkins.war --httpPort=8083 --logfile=/var/log/jenkins/jenkins.log

I user the plugin Jenkins Xvnc

When I make a build with Xvnc I get the following error:
Starting xvnc
[workspace] $ /usr/bin/vncserver :0 -geometry 800x600
vncserver: The HOME environment variable is not set.




Urivan Flores

unread,
Mar 26, 2013, 12:07:52 PM3/26/13
to jenkins...@googlegroups.com

Set the HOME env variable to the home directory of the user running jenkins.

Regards,

-Urivan

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

J Arrizza

unread,
Mar 26, 2013, 4:35:33 PM3/26/13
to jenkins...@googlegroups.com
I had a similar (but not exactly the same) problem on Ubuntu 10.04. I solved it by using this command line:

/usr/bin/Xvfb :$DISPLAY_NUMBER -ac -screen 0 1024x768x16

Set it in Manage Jenkins | Xvnc | Command Line. The Xvfb utility is part of the xvnc4server package.

In my case, without it, Xvnc complains about the lack of .Xauthority. The wiki for the plugin says to create the password for vnc manually which in turn will create the .Xauthority file. However, the userid "jenkins" does not show up in the list of users (use the "users" command). And it isn't clear how to the home path for the jenkins userid is actually set up:

cm6@cm6:/var/lib/jenkins$ sudo -u jenkins sh
$ whoami
jenkins
$ echo $HOME
/home/cm6
$ cd $HOME
$ ls .Xauthority
.Xauthority
$ cat .Xauthority
cat: .Xauthority: Permission denied
chmod the .Xauthority file to 777 causes other issues... and so on.

In any case, use Xvfb works nicely for me, hopefully it works for you.

John

JonathanRRogers

unread,
Mar 27, 2013, 1:37:23 PM3/27/13
to jenkins...@googlegroups.com
On Tuesday, March 26, 2013 4:35:33 PM UTC-4, JohnA wrote:
I had a similar (but not exactly the same) problem on Ubuntu 10.04. I solved it by using this command line:

/usr/bin/Xvfb :$DISPLAY_NUMBER -ac -screen 0 1024x768x16

Set it in Manage Jenkins | Xvnc | Command Line. The Xvfb utility is part of the xvnc4server package.

Actually, Xvfb is from the Xorg project and has nothing to do with VNC. The Ubuntu package which installs Xvfb is called "xvfb". It is similar to Xvnc in that it is an X11 server which maintains a framebuffer in regular memory and requires no display hardware. However, unlike Xvnc, it doesn't provide any way for a user to interact directly with a session.

Xvfb is ideal for running tests or other automated processes which need an X11 server available. I use it for running WebDriver tests through Firefox. I use the Xvfb Jenkins plugin which is really easy to use. I definitely think that this approach is better than VNC as long as there is no need for a user to interact with a session since configuration issues like those discussed here are less likely. It is possible to take screenshots and attach them to builds as artifacts, which my test suite does in the case of WebDriver test failures.
<URL:https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin>

J Arrizza

unread,
Mar 27, 2013, 2:20:22 PM3/27/13
to jenkins...@googlegroups.com
Well, excellent points all the way around. In my case I don't try to connect to the running xvnc server, so xvfb works just fine for me. And I'd say that the OP now has an additional option.use the Xvfb plugin. 

I am curious though, could someone give exact, step-by-step instructions to set the .Xauthority password correctly on Ubuntu? As I said in my previous post, the "jenkins" userid does not show up in the "users" command output, there is no "/home/jenkins" created when jenkins or the plugin is installed, etc.

John

--
Reply all
Reply to author
Forward
0 new messages