Using Xming, a free X-server for Windows, to connect via SSH tunnels

For those of you who are not interested in paying license fees for the proprietary Windows X-server, X-win32 there is a free alternative called Xming. I can be used for the same purposes such as running graphical programs on remote Unix or Linux servers.

Installation
The first thing to do is to download the xming x-server from the site sourceforge.net/projects/xming. Select the “Download” fan and the get the file called xming. You can also chose to instal the extras such as “Xming-fonts”, “Xming-mesa”, “Xming-portable-PuTTY” and “Xming-tools-and-clients” but these are not needed for normal operation.

The installation is pretty straight forward and the first thing to after installation is to start the X-server by double clicking the Xming icon. Now the X-server will be running in the background waiting for incoming connections.




To send some data to X-server from a remote Unix/Linux system we need to enable X-forwarding in putty. Putty can be downloaded from the site
www.chiark.greenend.org.uk/~sgtatham/putty/download.html

After starting putty one additional setting has to made. The X11 forwarding flag has to be enabled and point to the local X-server often localhost:0, where 0 is the display number.




After connecting to the server we should be able to watch graphical programs such xclock through the SSH connection.


Only registered users can comment.

  1. Xming is probably my favorite windows xserver app, but I have noticed some problems with it. Particularly with installing Oracle w/ using xming as an xserver I ran into issues with the installer hanging. When i used a cygwin xserver it didnt have a problem.

  2. thanks a lot for the small guide.
    has been very useful to me ;))

  3. If all documentation/man-pages on linux where as simple as this, “normal” people wouldn’t be so frightened of linux. I spend forever trying to find this simple information on the xming homepage. I tried to use the xlaunch program but for some reason it stopped working.

  4. It’s work really. A long time ago I left be an Unix Administrator and I didn’t remember about it. This tutorial was very important to me in this moment and by this I’m so grateful.
    So, thanks…

  5. Hi, I wonder if you could help, I’m trying to connect FROM the windows machine TO the linux machine. How can I set the Linux machine to listen for my connection? Thanks!

  6. SB: It all depends on the Linux distribution, but generally you will need to install a vncserver program on the Linux machine, such as “tightvncserver” and then connect to the vnc server with your user in a shell.

    The vncserver is installed by:

    root@bohr:~$ aptitude install tightvncserver

    Once tightvncserver has been installed on the server it has to be started as vncserver when logged in as the user on the system. The first time you use the vncserver you have to type in a password, which in the future will be remembered.

    tjansson@bohr:~$vncserver
     
    You will require a password to access your desktops.
     
    Password:
    Verify:
     
    New 'X' desktop is bohr:1
     
    Creating default startup script /home/tjansson/.vnc/xstartup
    Starting applications specified in /home/tjansson/.vnc/xstartup
    Log file is /home/tjansson/.vnc/bohr:1.log

    Here it is important to note the bohr:1 – this indicates the displaynumer which we will use to connect to the vncserver.

    There is also a GUI in Ubuntu for creating a VNC session, see link below. I have never used it, but if you find the terminal daunting then this might be an easy method:
    http://maketecheasier.com/set-up-a-vnc-server-in-ubuntu-hardy-heron/2008/05/30

Leave a Reply to benCancel reply