A few words of thanks would be greatly appreciated.

Installing an X server under Windows

It is possible to install an X server under Windows in order to use X-Windows applications (Gnome, KDE, etc..through an SSH connection).
  • The following method does not make use Cygwin. In the example below, our Windows PC (on which X server is installed) has the IP:
  • Linux SSH server on which you will connect has the following IP:

1. Install X-Ming

  • Download and install Xming
  • For example, take Xming-6-9-0-24-setup.exe .
  • Also install an SSH client such as Putty.
  • Start Xming: click on the X in the taskbar:

2. Open your SSH connection

  • Launch putty.
  • Configuration:
  • Enable X11 forwarding: "Connexion" > "SSH" > "X11" > check "Enable X11 forwarding"
  • To properly manage the function keys, go to "Terminal"> "Keyboard"> select "Linux".
  • And finally to display accented characters correctly in the terminal, go to "Windows"> "Translation"> and select "UTF-8"
  • Go back to "Session" and enter the address of the ssh server.

You can (if you want) enter a session name and click "Save" to save these settings.
(Simply double-click the session name to start the session.)

3. Launch applications!

Once connected, you can run graphical applications.

For example:
gedit &
firefox &
gnome-terminal &
xterm &

For example, here Synaptic and Firefox launched on Linux ( and displaying their windows in the X server of Windows ( through SSH:


Potential issues

If the graphics windows are not displayed, check that X11Forwarding is set to "yes" in /etc/ssh/sshd_config and restart your SSH server (sudo /etc/init.d/sshd restart)
If the command window gives you a message like:

Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted

when you try to run a GUI application, it simply means that a user is already logged in and using a X session.

Have the full desktop

If you want to have access a complete desktop (not only windows applications), you have several options:
  • XNest/gdmflexiserver
  • NX Server.
  • gnome-session

For gdmflexiserver, simply type in your the following command in the ssh console: gdmflexiserver -n
A new window will open and you can login with your username/password and receive a full graphical environment (desktop, wallpaper, icons, menu bars ...)

NX Server also works through SSH and it has the advantage of being much faster than X11 over SSH.
See these two articles:
  • install NX server
  • Install a FreeNX server

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Installing an X server under Windows », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).