SSH X-Forwarding on Windows

I recently had to remotely work on my Raspberry Pi from windows, to test computer vision related things on it.

For this purpose, it is necessary to see the graphical output of what you are doing, and so X forwarding would be very useful.

Here is how to process using PuTTY and Xming.

After installing Xming, look in the traybar for the Xming systray icon, hover it, and note the screen number that appears:

Xming Systray icon

Now go in PuTTY, load your profile, and in the Connection/SSH/X11 menu, check "Enable X11 forwarding. Set the "X display location" to "localhost:<the number that appears on the Xming systray icon>".

PuTTY X Forwarding

Log in to your server, and check that the /etc/ssh/sshd_config file contains the uncommented line

If this line was not already set to yes, save the the file and issue a:

Now, depending on your desktop manager, issue a:

And get back to work ;)!

SSH X Forwarding On Windows
Remotely Working on my Raspberry Pi on Windows



  1. Darrin Swanson says:

    No luck. I've been following many people's instructions for X session forwarding via xming and so for none have worked.

  2. teun says:

    Thank you. It works perfectly!

  3. shahab says:

    I followed your instructions but i get this error:
    "Only one lxsession can be executed at a time"

    and when running another application that needs X, (like midori) i get this error:
    "Midori - Cannot open display:"

    what is the problem?!!

  4. mubin says:

    Thank you,

    It worked on my RPi, but because I use 2 screen, RPi screen is shown widely on two screen, I can not make it smaller. Is there any configuration for the size of the screen?


Leave a Comment

  • @JeremyNicola