Using Cygwin/X
If you're not tied to Xming, you can instead use Cygwin/X for running an X server in Windows.
Preparing the Raspberry Pi
Try to establish a regular SSH connection from Windows to the Raspberry Pi using PowerShell:
Given that Raspbian Buster includes X11Forwarding yes in /etc/ssh/sshd_config, your Raspberry Pi should also be able to forward the visual output of X11 applications to an X server on Windows.
The next step shows how to install that X server.
Install Cygwin/X on Windows
Cygwin/X provides an X server for Windows that displays GUI applications running on the Raspberry Pi.
Download and run
setup-x86_64.exefrom Cygwin's website.For Cygwin's "Local Package Directory" you can use
C:\Users\me\AppData\Roaming\Cygwin.Choose a server near you for downloading packages.
Set "View" to "Full" and search for
xinit.In the "New" column, use the drop-down menu to change the value from "Skip" to
xinit's latest version:
- Install package
opensshthe same way.
Connect to Raspberry Pi from Windows
- Start the X server using Windows' start menu:
Cygwin-X → XWin Server. This won't open any windows, but you should see two new icons in your system tray:
Start the Cygwin terminal:
Cygwin → Cygwin64 TerminalSet the
DISPLAYenvironment variable to where the X server on Windows runs:export DISPLAY=:0.0Connect to your Raspberry Pi with X11 forwarding:
ssh -Y pi@raspberrypi
export DISPLAY=:0.0
- Connect to your Raspberry Pi with X11 forwarding:
ssh -Y pi@raspberrypi
Inside the SSH session, you can now start an X application on the Raspberry Pi like Thonny:
Alternatively, as user1297 mentioned in the question's comments, you can run x-session-manager to emulate the experience you'd get when connecting to the Raspberry Pi via HDMI on an external monitor:
If you want to start an application directly without first typing its name in the shell, use this:
ssh -Y pi@raspberrypi x-session-manager On macOS
XQuartz provides an X server for macOS.
Install XQuartz, log out and back in (to make the new value of DISPLAY effective), then launch applications with SSH from Bash:
ssh -Y pi@raspberrypi thonny 





