I am trying to launch GUI from the ssh via Cygwin on Windows 7. First, I selected the option to start RPi Desktop via raspi-config and reboot. Then, I connect to my device ssh -X -l pi from Cygwin bash as explained here. I expect to see the GUI but instead I am in command line. I try to run startx command to launch GUI from my RPi, but I get the following error:

enter image description here

It stays like this until I Ctrl+C and then

^Cxinit: connection to X server lost

waiting for X server to shut down Server terminated successfully (0). Closing log file.
xinit: unexpected signal 2

Why do I get this fatal error? What is that module and why is it not found? How can I properly launch RPi GUI via Cygwin ssh terminal?


How can I properly launch RPi GUI via Cygwin ssh terminal?

First make sure you installed X11 packages from your Cygwin installer. After that launch a Cygwin terminal.

$ cygstart xwin
$ DISPLAY=:0.0
$ export DISPLAY

First line will launch a black screen, which you will project your RPi's desktop to. Second line will make sure the terminal is aware of this remote display (0.0 is the device which you can see in the window of your display as in Cygwin/X:0.0). Next, connect to your RPi.

$ ssh -Y pi@address

Once you are logged on, run the lxsession command and you can access your desktop remotely from the Cygwin remote display window.


I guess what you call the GUI is an X Desktop.

If you are using raspbian, the defaut window manager is lightdm, it could be configured to accept remote display using XDMCP.

On the raspberry :

  1. Enable remote access modifying /etc/lightdm/lightdm.conf
  1. restart lightdm
sudo service lightdm restart

Now you should be able to start a remote X Desktop from the window cygwin environment using :

xwin -query <raspberry address>

Also there is a nice tutorial that explain how to configure XDM on a raspberry in order to use the Xming xserver http://www.straightrunning.com/XmingNotes/pixming.php


I can use it:

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf Option "fbdev" "/dev/fb0" 

I changed from 0 to 1


I got this error when I tried to startx from a sshsession (putty)

When I connected a display to my Raspberry Pi "X" starts just fine.

A the same time But i still have the same error on the remote terminal.

My conclusion: It is not possible to stream a X windows trough our ssh client in current configuration.

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.