Home Download Debian

How to forward GUI programs over SSH in Windows

Forwarding GUI programs from our linux box to our Windows client requires:
- on windows client: putty, a X Window Server like Xming and Xming-fonts
- on linux box (server part): a linux distribution with GUI interface, like XFCE, Gnome or KDE

Required steps:

1. Install Xming and Xming-fonts

Download Xming and Xming-fonts, double click them and hit next all the way to finish.

2. Start Xming

You should see an X icon to tray.

3. Configure Putty

Under Host Name (or Ip adress) enter the hostname or ip adress of your linux box. Under Port enter the port number on which SSH server is running.

Check Enable X11 forwarding. Under X display location enter localhost:0:0. Then check MIT-Magic-Cookie-1 under Remote X11 authentication protocol.

And finally hit Save the session under Session category on the left side and click Open.

4. Starting any GUI program from your Windows client

firefox &


mousepad &

These commands are under Debian installation with XFCE interface. Notice the & sign. This is required if you want to run multiple applications from your linux box, otherwise putty will wait until you exit the application.


1. if the command gives you an error like this one:

Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
mousepad Xt error: Can’t open display: localhost:10.0

you need to run these programs under the same user you logged in to putty OR copy the xauth key from that user to current one. Links: froebe.net, gilandre.net

2. if you get an error like this:

Error: no display specified

run this:

export DISPLAY

where is the ip address of the client

3. An alternative to setup a connection to forward GUI programs over SSH in Windows is this video:

This video is a HakTip on hak5.org named X11 over SSH part 1

Resources: XmingNotes


Post a Comment