2

Jenkins cannot start xvnc, because USER variable is not set. Here is the output that I get:

Starting xvnc
[workspace] $ vncserver :10 -localhost -nolisten tcp
vncserver: The USER environment variable is not set.

Where should the variable be set? What should it be set to?

Sachin K
  • 339
  • 4
  • 14

2 Answers2

0

Verify that the Environment variable is present for the user that you're running the Jenkins service as. This may or may not be different from the user you're logged in as depending on your configuration.

You may also want to look at the EnvInject Plugin which you should be able to use to configure the environment for what you need.

Peter Bernier
  • 8,038
  • 6
  • 38
  • 53
  • 2
    Thanks! I tried, but still get the error. Any other ideas? `[EnvInject] - Injecting as environment variables the properties content USER=jenkins [EnvInject] - Variables injected successfully. Starting xvnc [workspace] $ vncserver :14 -localhost -nolisten tcp vncserver: The USER environment variable is not set. Starting xvnc` – Sachin K Mar 12 '13 at 05:01
0

In your shell just execute this command export USER=root or whatever user you logged in