X11 on Windows

In order enable a remote Unix/Linux machine to display X11 (X Window System version 11) application windows on your Windows PC desktop, an X11 server application must be running on your Windows PC.

Several X11 servers for Microsoft Windows are available, and the easiest to use is MobaXterm.

MobaXTerm for Windows users

Go to the MobaXterm Homepage and click Get MobaXTerm Now. Choose the free Home edition. You can choose between a portable version and an installable version, we have only tested the portable version but expect that both work:

  1. Download it.
  2. Unpack the ZIP file.
  3. You can now move the executable to wherever you want, e.g. your desktop or onto a USB stick so you can use MobaXterm from other Windows machines.

Logging in the first time

When you run the program the first time you just need to write the name of server in the Quick Connect field in the upper right corner, then press enter:

  • A new window opens.
  • Choose the connection type SSH on the top bar.
  • Specify your DTU user name in the corresponding field.
  • A terminal tab now opens in the original MobaXTerm window, and you are asked to type the password.

Logging in next time:

  • MobaXTerm remembers your settings. Just click on the server name under Saved Sessions.

Please note that MobaXTerm also gives access to the files on the server, so you can transfer files to your own computer if you so desire.

Installing Xming

NOT recommended any more.

These instructions appear to be working in Windows 7 and Windows 8:

  1. Go to the Xming web site, and download it.
  2. Run the installer. On the second or third dialog it asks which kind of PuTTY link client you want to use. If you already have PuTTY installed, the choice does not matter much, if you do not you should choose Portable PuTTY SSH link client.

  3. Then it gives you options for making desktop icons, you don’t need strictly need them, but the Xming icon is useful if you log in with PuTTY.
  4. Before clicking Finish you should unselect "Launch Xming".

Logging in with a remote xterm

Logging in the first time:

  1. Start the Xlaunch program from the Start Menu (in the Xming sub-menu).
  2. Select “Multiple Windows”. Click Next.
  3. Select “Start a program”. Click Next.
  4. Change the program from xterm to xterm -ls (that is a minus, and the letters l and s). Select "Using Putty" in the “Run Remote” box. In the field “Connect to computer” you write the name of the machine you want to connect to. Also fill in “Login as user” and “Password”. Click Next.
  5. On the dialog “Parameter settings” leave everything as it is. Click Next.
  6. Click “save configuration” and save the configuration on the desktop, e.g. under the name of the computer you are logging onto. You MUST specify the full file name ending in .xlaunch, i.e. “niflheim.xlaunch”. DO NOT SAVE YOUR PASSWORD!!!
  7. Click "Finish". A terminal window opens where you are logged onto the remove machine. You most probably get two warning dialogs stating that a configuration file cannot be read, and asking to confirm a cryptographic key. Just click OK, they only appear the first time.

If you are unable to connect (only a short popup appears) and the Xming log file contains (accessible by right click options from the Xming icon menu):

Duplicate invocation on display number: 0. Exiting

make sure to close the running Xming instance, and execute the .xlaunch file to open a session.

Logging in the second time or later

Execute the .xlaunch file you saved. You are then asked for the password.

When logged in

When logged in, an xterm window running on the remote machine will open. Any other graphical program you start will also display on your local PC


Warning: Note that if you close the initial xterm window, the connection to the X server is partly broken, and new programs will be unable to start. Running programs will continue to work, and the X server will shut down when the last window is closed.

Logging in using PuTTY

First time, set up the connection:

  1. Double-click on the Xming icon to start the server (or start it from the Start Menu)
  2. On the session tab, fill in the host name of the ssh gateway.
  3. Then choose Connection / SSH / X11 and check the “Forward X11 button”. Also fill in the X display location, it should be :0 (that is a colon followed by the digit zero).

  4. Return to the session tab (the first), fill in a name in the field “Saved sessions”, then press Save.
  5. Press the Open button to log in.

Second time or later:

  1. Start PuTTY
  2. Double click on the name of the saved session.

When logging out from PuTTY, the X server remains running, and can be used next time you log in.

Xming server on a USB stick

If you need to access Niflheim when traveling, it can be useful to have the X11 server on a USB stick. To do this, you should choose the "Portable PuTTY SSH link" option when installing, as the normal version of PuTTY will alter the Windows registry, and that may not be allowed (nor desirable) from a USB stick.

Just copy everything from the Xming installation directory Program Files\Xming (10 MB) into a directory on the USB stick, and then run Xming from there.

You can now use the X server directly from the USB stick on other computers, without installing anything. Just click on the Xlaunch icon.

Niflheim: X11_on_Windows (last edited 2016-11-07 07:36:59 by OleHolmNielsen)