How to export XWindows display using PUTTY


Introduction

If you use PUTTY tool to ssh into a remote host and are trying to run a graphical tool …like say Mozilla or XClock or some Java Swing based installer that has screens you navigate …then you need to EXPORT your DISPLAY. Lets assume you are doing this from a Windows machine to a remote host (this applies to a Linux/Unix machine to a remote host too – where you are using “ssh” and a local xserver)

Get XServer on your local (Windows) machine

I got XMING from here ….

  http://transact.dl.sourceforge.net/project/xming/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe
  • Start a command prompt and do ipconfig /all and see your IP Address
        Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : mycompany.com.au
        Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controller
        Physical Address. . . . . . . . . : FX-XX-...
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : xx.xx.xx.xxx
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . :
        DHCP Server . . . . . . . . . . . :
        DNS Servers . . . . . . . . . . . :

        Primary WINS Server . . . . . . . :
        Lease Obtained. . . . . . . . . . :
        Lease Expires . . . . . . . . . . :
  • Start a Putty Client, before you connect to your VM
      • Check/Select “X11 Forwarding” in Putty (see image below) by selecting check-box under “Category: Connection -> SSH -> X11” in the Left-hand panel and “SSH X11 forwarding” in the Right-Hand Panel

      • Check/Select “Port Forwarding” in Putty (see image below) by selecting check-box under “Category: Connection -> SSH -> Tunnels” in the Left-hand panel and “SSH Port forwarding” in the Right-Hand Panel

  • Putty into your VM and set the DISPLAY variable, I did
    • "export DISPLAY=<my ip address>:0"

2 Comments

  1. edgar says:

    thanks a lot! Check “SSH X11 forwarding” was very trick!!

    Like

Leave a Comment