I have a functioning Cygwin installation on my Windows 10 device (a Surface 3, in case that matters), including a functioning Xorg windowing environment. I've just begun to experiment with with the Windows Subsystem for Linux, as well. It seems like the advice for running GUI applications from WSL is to install another X server. Usually Xming is recommended, but I haven't seen any suggestions that Cygwin shouldn't work.
However, the simple way fails:
WSL $ export DISPLAY=:0
WSL $ emacs &
Display :0 unavailable, simulating -nw
I suspected it might be a networking issue, because of
WSL $ telnet localhost 6000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
WSL $ /sbin/ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
WSL $ # there was no output at all, actually
... but ssh to a remote machine works fine, and apparently Xservers have stopped listening on port 6000 since the last time I debugged one.
I tried running cygwin $ xhost +localhost
, only to discover that xhost
isn't currently installed there. Which might be the next thing to try, or might be a wild goose chase --- xhost
(or at least, a naked xhost +
) was mostly discouraged the last time I debugged an X server.
Is there some fundamental flaw preventing WSL from using the Cygwin X server? If not, how shall I proceed?
/etc/X11/Xresources
and change theXft.dpi
default from 96. Your display should be 214 DPI, so text must look quite tiny through CygwinX. Regardless, you can tweak that DPI value to change the scaling to your liking. (Just restart CygwinX between changes.)