Using Putty to remotely open GUI applications

1 Introduction

Remote connections can be established with system over a network through SSH (secure shell) easily, we can login, perform actions or send commands to another system remotely trough this conection on the commandline. But what we cannot do is launch a GUI application for viewing content present in the remote node. This is the disadvantage of using ssh in a terminal.

But this disadvantage can be easily solved by making use of "putty", a remote login application which can not only be used to login to a remote node, but also launch GUI applications. Examples of GUI applications are Browser, text viewers, etc.

This tutorial concentrates on installing and using Putty on a raspberry pi cluster running Raspbian OS and MPICH2 (message passing interface). We use putty to view some text files using the "leafpad" application and browsers like "Netsurf" and "Dillo" that are pre existing on any version of Raspbian. We will also look into saving the setting, so that the second time onwards, its just a click to load the settings.

2 Installing and launching Putty

Putty can be installed through terminal. Run the following command:

sudo apt-get install putty

Once installed, test if it has been successfully installed by running it. To run it there are two ways:

1. type the command in the terminal:


2. or you can also launch through the menu, as shown in the following image:

Once you open putty, it will look like the image below.

3 Configuring Putty

Once putty is launched, we first enter the IP of the node we want to connect to in the "Host Name" field located in the session window. Here we log into the IP "". Refer to the image below to enter the IP:

Once the IP is configured, we will have to enable X11, which enables us to run GUI based applications from the remote node. To do so, follow the steps:

  • On the left panel of putty, scroll down and select the SSH option.
  • After clicking on SSH, you get many options, click on the "X11" option , which is present in the left panel.
  • Once X11 is selected, check the option that says "Enable X11 forwarding" on the right side.

Once the above steps are done, the putty window must look like the image below:

4 Connecting to the remote node

Once X11 forwarding is enabled, click on the open button present at the bottom of the putty window.This opens a connection with the remote node with the IP "" and you can see a terminal. Also I have run the "ls" command just to show the files that are present in the remote node I have logged into. It looks similar to the image below

5 Opening HTML files in browser

The way in which we can open HTML files in raspberry pi remotely depends on the browser being used. Here I will show you to use Dillo and Netsurf to open an existing HTML file called "sum1.html".

5.1 Using the Netsurf Browser

To open the file "sum1.html", we type the following command in the terminal:

netsurf file:///home/pi/sum1.html

The following image shows the command and the Netsurf browser that has opened.

5.2 Opening HTML files in Dillo browser

To open the html file using the Dillo browser, use the following command in the putty terminal:

dillo sum1.html

The following image shows the command and the Dillo browser that has opened.

Generally , the Netsurf browser is preferred, but in cases where the bandwidth of network is low, Dillo can be chosen as it has less overhead.

6 Opening text files in GUI editors

Raspbian comes with a nice GUI based text editor called "leafpad", which is a powerful yet simple editor. Here we will open a text file called "indsum1.txt". To do so, use the following command:

leafpad indsum1.txt

The following image gives an example of how it will look.

7 Saving the settings

When you want to launch GUI applications on nodes every time you use Putty, then you should choose to save the settings. To do that, right after you finish step 3, click on the "sessions" tab on the left panel of the putty window. Below you can see a text box, above which it says "load, save or delete sessions". So, in that text box type a session name. Here, I give the name as "GUI_login" and click on the "save" button on the right panel. Once done, the name should appear in the box below. So, each time you want to launch it, all you have to do is double click on the saved name. Below is an image showing this:

8 Conclusion

You can try and you will find out that using just the ssh to open GUI applications on remote nodes doesn't work. There might be other methods, but not as simple as using putty.One thing to be noted here is that, this might use a significant amount of the network bandwidth.

So, from this post we have seen how we can run various GUI based applications using the applications that are already pre existing within the Raspbian OS. This method can also work seamlessly on Ubuntu and Debian OS as well.

Share this page:

10 Comment(s)

Add comment


From: Pete

Or you can simply use the -X option of ssh:

ssh -X [email protected]_host

From: nightflier

Wouldn't it be easier to use ssh with the "-X" option, in a terminal?

From: Juan Carlos



Nice tutorial. However you can open remote GUI applications using ssh from the command line:


ssh -X [email protected]


will enable X11 forwarding in your SSH session.

From: Joachim

Can't you simply use the option X for GUI over SSH? Also, add a C for compression.

   ssh [email protected] -C -X


From: Tom Tucker

Using putty will work, but you can also use ssh as well.  ssh [email protected] -X (note the capital letter), will let you open any gui application by typing the command at the terminal.

From: eMBee

since everyone is recommending ssh -X, i'd like to pint out ssh -Y is a better way to enable X11 forwarding. check the ssh manpage for details.

greetings, eMBee.

From: eMBee

scrap that. i missread the manpage. -Y is the less safe option (it trusts more, not it can be trusted more)

-X should be preferred!


greetings, eMBee.


From: Rick

Thanks for the great tutorial! To all you folks saying to just use ssh -x, my windows 7 box doesnt have ssh  ;-) so putty is the best solution to for this.

From: patrick

Your Windows 7 box also doesn't have an X server, so putty still won't help you run GUI apps.

I recommend Cygwin for Windows; X server with ssh... everything you need.

From: Anuj

Hi, thanks for the tutorial. I want to know how to use the serial communication of putty in this same configuration.

On windows, I have a project in which I communicate with a nordic bluetooth dongle using serial communication over putty. I want to port the project to Raspberry Pi. 

Now, I have putty installed on Raspberry Pi 3. I just want to verify that to communicate with the dongle using serial communication, I need to use the USB to serial TTL wire and connect the dongle to that USB and the wires to serial ports of Raspberry pi 3 and then access the serial port using putty and the name of com port being used. Is this method correct ??Thanks :)