Question

Trying to get some jobs working that require xvnc, but get this:

  Starting xvnc
  [workspace] $ vncserver :14
  vncserver: The HOME environment variable is not set.

I have no problems with running vncserver from the jenkins user on command line. (aside: 'printenv' shows the HOME variable is populated correctly when on the command line, but not from within a jenkins job).

I am running Ubuntu 11.10.

Was it helpful?

Solution 2

Go into: /etc/init/jenkins.conf

Add the following line to the bottom of the env list.

env HOME="/var/lib/jenkins"

restart jenkins, enable the xvnc in your build, and then it will work.

OTHER TIPS

Edit /etc/init.d/jenkins on the server to set HOME environment variable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top