How to connect to Linux GUI from a Windows machine

X Server Logo Hello all, this is a problem sooner or later everyone of us has faced, connect to a Linux machine GUI from a Windows machine, the most obvious answer that could come to your mind is using VNC or specifically Vino from a Windows machine but… but I don't like VNC and it is not the most "secure" option out there, you could also tell you can simply use putty to connect via SSH but this will let out the GUI which is sometimes needed specially when connecting to client machines like in my case so I'll explain this process in detail.

What you need is the following :

- Make sure that X forwarding is enabled on your Linux machine

- A compatible ssh client like Putty

- An X server installed on your Windows machine, for this post I'll use a port called Xming which can be found here

Ok first of all let's make sure that X forwarding is enabled on your Linux box, to do this simply open the sshd config file which can be found under /etc/ssh/sshd_config and make sure there is the following line :

X Server Forwarding Configuration

The X Forwarding yes directives instructs the SSH daemon to forward the output of the local screen to a remote X server, this is enabled by default so just make sure you have enabled this.

The second step is to download the Putty package for windows and the Xming package and install the latter on your Windows machine, the installation process is pretty simple so I won't descript it here for the matter of this post just accept all the defaults and refer to the Xming documentation if you need any help for a specific configuration.

Once you've installed Xming on your machine make sure it properly started, you'll find a small X icon in your tray bar, and open Putty which we need to configure so that it'll properly handle X forwarding all you need to do is to check the box Enable X11 forwarding under the Connection -> SSH configuration pane on your left, it is a good idea to save the session so you don't have to repeat this every time you connect to the machine, as you can see below :

Putty Configuration

Once you've done this just insert the IP address of the machine to which you want to connect, select the SSH protocol and click connect of course you'll be asked for your credentials and you'll see a window similar to the following :

Putty Connection

Putty Connected to the host

Now it's where the funny part comes :) All we have to do is to select which application we need to launch and simply input the command that we need, in my case I'm going to use Gtranslator which is a software that I use to translate the files that compose my beloved Fedora release :)

Remote Application

As you can see it is launched on my actual Windows screen, which is basically the Xming X server handling the transfer and render of the application graphics, as if I had launched a native Windows application, keep in mind you'll see in the Putty screen some text scrolling up which is simply the commands your Linux machine is running to initialize the command you've launched. An handy "option" to keep in mind is to use the & at the end of the command so that the command launched will give the control back to the shell after the command has been launched and so that you can run multiple commands from the shell.

I hope you've found informative, please feel free to comment the post if you have any doubt.

 

Lethe.

dp seal trans 16x16 How to connect to Linux GUI from a Windows machine  Copyright secured by Digiprove © 2009

Buzz it!
  • Share/Bookmark

1 Comment

Trackbacks and Pingbacks

Leave a Reply

 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes