Howto Easily run an Xserver under Windows

Sometimes, you need to connect from Windows to a Unix or Linux system just to run a specific software. For example, if you want to run some Linux open source program under windows and you have a Linux machine in your network or accessible from the Internet, there is an easy way to do it: Xming.

The installation is pretty forward. Once installed, the easiest way to use is to run it straight away. You have an X icon on your windows desktop, run it.

Then you need a remote terminal connection software, the best open source is Putty.
It is an executable, just download it and lunch it. Depending from the remote terminal service that is running on your server, configure Putty to use it. I suggest OpenSSH. You have also to configure the X11 Forwarding setting in Putty to forward the X session to your windows machine IP address. Done.

You will get a console, login in on your Linux server and lunch the application you want. Magically, it will appear on your windows desktop. I use this method to run application like Kivio (no need to buy Visio ) or other good open source that I will mention in other articles, on my office notebook when I am at home. The server is my Linux machine.

I repeat the instruction:

1) Install under Windows Xming and Putty

2) Have a terminal server running under Linux, like OpenSSH

3) Execute Xming under windows: double click the X icon

4) Execute Putty: configure it to connect your server Ip and to forward the X11 to your Windows machine IP.

Note, both of these applications are "portable" and can be copied to a thumbdrive and run on any machine you may have access to.

Launch Xming and select the style you wish to display the X server output. Hint: Select Multiple Windows and your X applications will look like they were launched from Windows. Leave Display number set to 0
Click Next. Select Start No Client and click Next.
On Server Options, check the box title Disable Server Control. Leaving the box unchecked can give you an "unspecified protocol error" later down the road.
Click Next and save your configuration. This will create a quick way to launch Xming later.

Once you see the X in the systray you can launch Putty.
Enter the address of the machine you are trying to connect to. Be sure to select SSH as the protocol.

Now connect. With luck you will be asked to log in. Enter your credentials.
Now to actually forward the ports. There is an option in Putty for this but it never seems to work for me.. so I type:

DISPLAY=your.windows.ip.address:0.0
export DISPLAY

Subsitute the IP address of the windows machine you are running Putty on. DISPLAY must be typed in uppercase! If everything is going correctly your Ubuntu box will say nothing back when you enter these commands.

Now, the test. Type

xclock &

and an analog clock should appear. Try

mozilla-firefox &

and your web browser should appear. Looking for your email? Try

evolution &

or

mozilla-thunderbird &

Be sure to use the amperstand after each command so that you can launch multiple apps. Otherwise, the terminal "hold" the commands until the application is closed.

When you're done, type exit in Putty and it all goes away!

Neat thing is that the clipboard works and you can copy and paste from system to another.

You won't be able to see your desktop, so you'll have to know the names of the apps you want to run. To see the desktop requires XDMCP, which is easy to set up but is NOT secure.

Re: Howto Easily run an Xserver under Windows

ok, i got this to work on my local network. but i really want to be able to access my machine from anywhere. i really need help with my router and configuring that pos. any help is greatly appreciated.

Re: Howto Easily run an Xserver under Windows

SSH is port 22 and you might have to forward that from your router to the Ubuntu box.

You need a way to know you external IP address. Create an accout at dyndns.org, install a dynamic dns client on a machine (windows or linux box, it doesnt matter, but only pick one) and you can find your machine by a name instead of a changing IP.

Re: Howto Easily run an Xserver under Windows

agreed. xming is great, i use it at work quite a bit. putty is also great. open source on windows - not something my work likes (can't figure out why they want to spend hundreds of dollars on reflection x when xming works better).