0

I have connected Linux server (centos 64bit)using VNC viewer. Then I have tried to run java swing application using this command (java -jar app.jar).

I am getting this error "Can't connect to X11 window server using ': 2.0' as the value of the DISPLAY variable"

Selvam R
  • 101
  • 2
  • could you run other x application like xclock/xcalc? What this says is display server at 2.0 is not allowing client to connect to it. – Jayan Mar 28 '13 at 12:49

1 Answers1

1
  1. ensure there is display at :2.0 (looks like you had white space?)
  2. ensure that the display allows clients to connect from some where. (xhost + ...)

( xhost + will allow every client to connect. You can restrict to your ip or some thing like that.)

Jayan
  • 361
  • 1
  • 3
  • 15
  • tnx for your response. I am new in linux. could you please tell me the step to check display and xhost –  Mar 28 '13 at 13:30
  • using root user. I am able to open the swing ui. but not from other user. any idea how to set the same ui settings for other user also? – Selvam R Mar 29 '13 at 06:49