0

I have several machines on my LAN and my main workstation called lagrangian. Machines can ping lagrangian. All machines can have

DISPLAY=lagrangian:0

set. I run VcXsrv on lagrangian and hence can run any XWindow applications of other machines, having windows displayed on lagrangian.

Except one. It says

Error: Can't open display:

What can be a reason?

  • Have you checked the error logs? – cutrightjm Sep 11 '16 at 19:04
3

The error message line ends with the value of the display it is trying to connect to. Since there is nothing on the line you probably have failed to set the environment variable on that machine for some reason. Try printenv DISPLAY to verify. If it was correct it would print lagrangian:0, but I suspect it won't.

  • 1
    printenv DISPLAY isn't as portable as echo $DISPLAY. Just a note, in case he's not got your exact environment. – Wyatt8740 Sep 11 '16 at 21:09
  • 1
    But it's not quite the same thing. echo $DISPLAY will show also shell variables that are not exported to the environment. If someone sets the variable without doing export, (s)he might be fooled if doing it with echo. – Göran Uddeborg Sep 11 '16 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.