Question

I am getting the following error when i try to connect to a remote host.

Can't connect to X11 Windows server using "0:0" as the value of the display variable.

How do i get past it?

Other info: 1. I am running a windows machine and the host is unix based. 2. I have Xming installed. 3. I have given the display command as export DISPLAY=0:0 4. I have checked X11 option in SSH.

Was it helpful?

Solution

There are a couple of problems here:

  1. The DISPLAY is in the format :. so you were probably told to set it to ":0.0" but this is wrong as that is the default server on the local machine.

  2. When you connect using ssh (with X11 forwarding enabled), the DISPLAY variable will be set by ssh to something like localhost:10.0 so you shouldn't have to set the DISPLAY variable anyway (unless something like your .bashrc changes it).

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