How to Connect To A Raspberry Pi Using X11 And Cygwin

X11 view of a Raspberry Pi using Cygwin
X11 Connection to a Raspberry Pi using Cygwin

Open up a cygwin shell and enter the following command at the prompt

$ cygstart xwin

Cygstart tells cygwin to run a command and return control to the shell, thus removing the need for two shells, one to launch the xwin application and the other to handle the ssh connection.

With the xwindow running we need to make cygwin aware of the remote display by exporting the environment variable DISPLAY with the appropriate parameters, taken from the title of the newly opened window: it will likely look something like this Cygwin/X:0.0. Enter the following command as appropriate

$ export DISPLAY=:0.0

Now start the SSH connection to the raspberry pi using cygwin with the following command and your own username and ip address

$ ssh -Y user@address

After the logon to the pi is completed start the xwindow session using the following command

$ lxsession

You should now have an x window connection to the pi along the lines of that shown above.