Geek Stuff > Tutorials > X11 Forwarding in Windows
X11 Forwarding in Windows
Prerequisites
- Accessible Linux (or other machine) that supports X11 and SSH
- Windows machine that supports PuTTY and Xming
Configuring Windows
Before anything can be done on the Linux machine, the Windows machine has to be able to access it. The program that we will use to remote (using SSH) into the Linux box is called PuTTY, and it can be downloaded here. Make sure to download the full version (putty.exe) and not the specialized versions.
Once you've downloaded PuTTY, run it. You should see a window similar to the one at the right. Now, you may be tempted to jump the gun and
connect to your Linux box now, but hold off for a for just a bit.
It saves time to configure Xming in Windows before you connect to the Linux machine. Download Xming from
this page, install it, and run it. If it's been configured correctly you should see
nothing. To double check, press +R and enter cmd. Then run the following:
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Will>tasklist | find /i "xming.exe" Xming.exe 5708 Console 2 15,436 K C:\Users\Will>_
(NOTE: If the above command doesn't output anything, then Xming is misconfigured. Please email me about this problem; I'd be happy to help you sort it out.)
Now that Xming is up and runnning it's time to configure PuTTY. Go to Connection > SSH > X11 and make it reflect what's shown at the left.
You may be tempted to enter localhost:0 for the display location, but make sure that you enter 127.0.0.1:0. Once you're done, click Session,
then save these as your default settings.
Once you're ready, connect to your Linux machine from the Session menu.
Testing the configuration
Now that you've got you Linux machine up, you should see a login prompt. Go ahead and enter your username and password. Once that's done, you're going to need to run an X11 application to test Xming. (Examples are xterm, xeyes, and xclock.)
If one of these works, then Xming is properly configured for multiwindow forwarding.
Forwarding the desktop
By default, Xming is configured to forward multiple X windows at once. However, this won't work if you try to forward a window manager to view your desktop.
To properly forward your desktop, you're going to need to configure Xming to run in full-screen mode. First, open Task Manager and stop any running instances of Xming (xming.exe). Then, open Run (+R) and type
This will bring up Xming in full-screen mode. Press Alt+Tab to switch windows and get back to the Windows desktop. Then open PuTTY, log in to your Linux machine, and enter the command to start your window manager. (For gnome, it's gnome-session)
Then, click the Xming icon on your Windows taskbar to enter your Linux desktop. If a black box appears at the top left of the screen, click it then click somewhere in the middle of the screen to give Xming focus.
Questions? Comments? Click here to drop me a line. I'm open to criticism and happy to help you troubleshoot.