XMING MAC WINDOWS
Unix sockets are not well-supported on Windows at this point in time, even inside WSL. VcXsrv, or XMing), it is more likely that your X11 server is listening on a TCP port (such as 127.0.0.1 port 6000-6010) than on the default Unix domain socket ( /tmp/.X11-unix/X0). If you are running cygwin, or Windows-Subsystem for Linux, and your X11 server is windows-based (e.g. It's not exactly clear, however, why that's the case from that answer alone, so I'm remediating with this answer. The accepted answer is correct: your DISPLAY variable is incorrectly configured. This is complementing other answers with information specific from Windows-Subsystem for Linux (WSL). Netstat -x | grep X may also give a clue.įor the record, on a Linux Debian wheezy machine here, Xorg listens on both /tmp/.X11-unix/X0 in the filesystem and /tmp/.X11-unix/X0 on the abstract namespace (generally written From strace, X11 applications seem to now use that abstract namespace by default, which explains why those still work if /tmp/.X11-unix is removed, while ssh doesn't use that abstract namespace. To figure out what the proper path is for the unix socket, you could try a strace -e connect xlogo (or the equivalent on your system) on your local machine to see what a normal X application does. Now, maybe you don't have a X server running (are you on Mac?) or maybe the unix domain socket is not to be found in /tmp/.X11-unix which would mean ssh hasn't been configured properly at compile time. The ssh client then tries to connect to /tmp/.X11-unix/X0 (on the local end, not the remote) to contact your X server.
![xming mac xming mac](https://s2.studylib.net/store/data/011403941_1-3c634966bde4dd912a3781c1e464e3e4-768x994.png)
sshd on remotemachine listens for connections on there and forwards any incoming connection to the ssh client. When you ssh to machine remotemachine, sshd on remotemachine sets DISPLAY to localhost:10 (for instance), which this time means that X connections are do be done over TCP to port 6010 of machine localhost. If you have a X server running and the DISPLAY environment variable is set to :0, that tells applications to connect to the X server using a unix domain socket which is generally to be found on Linux in /tmp/.X11-unix/X0 (though see below about the abstract namespace on recent Linux).