Want to remotely access a Linux machine and launch a graphical application? PuTTY to the rescue, thanks to the “enable X11 forwarding” option. You can even do this from Windows—all you need to do is quickly install an X server.
The PuTTY program was initially written for Windows, 20 years ago. It has been ported to many other platforms since. It is a graphical application that provides a terminal window and remote connection to other computers. Typically, the connection is made using SSH, but other protocols are supported.
As well as the traditional terminal window command line interface, PuTTY can be configured to open graphical applications on the remote computer.
If PuTTY isn’t already installed on your computer, you can install as follows.
On Windows, download PuTTY from the web.
To install PuTTY on Ubuntu, use this command:
sudo apt-get install putty
To install PuTTY on Fedora, use this command:
sudo dnf install putty
To install PuTTY on Manjaro, use this command:
sudo pacman -Syu putty
Using PuTTY On Windows
If you’re running PuTTY on Windows, you’ll have to install an X server before continuing. The rest of the process will then work the same as it does on Linux.
Linux graphical applications rely on an X server to provide a graphical desktop environment. There has to be somewhere for the graphical applications to open and run in. Windows doesn’t have an X server because it doesn’t need one. So we’ll need to install one, just like when launching graphical Linux applications from Windows 10’s Windows Subsystem for Linux.
The Xming X server was used to research this article, and it performed perfectly. Download it and install it. You can accept all of the defaults. It runs as soon as it is installed and appears as an icon in your system tray.
On Windows, you’ll find PuTTY in your Start menu after installing it. On GNOME you can start PuTTY by pressing the Super key—the one between the right hand Ctrl and Alt keys—and typing “putty”.
The PuTTy icon will appear at the top of the screen. Click on it to launch PuTTY.
Connecting With PuTTY
The PuTTY window will appear. In the Host Name field, enter the IP address or the network name of the remote computer you are going to connect to. There must be an SSH server running on the remote computer.
In the side pane, scroll down until you see the “SSH” tree entry. Expand this, then expand the “Auth” entry, and highlight the “X11” entry.
Select the “Enable X11 forwarding” checkbox.
In the side pane, scroll to the top of the list and select the “Session” entry. Type a name for these settings In the “Saved Sessions” text field, then click the “Save” button. Typically you would save the settings under the name of the remote computer so you can easily re-use them for future connections.
Click the “Open” button to connect to the remote computer.
The first time you connect to a remote computer, you’ll see a warning that you have not connected to this computer before.
Click the “Accept” button to complete the connection.
An x-term window will appear. Enter the name of the user account you are connecting as, and press Enter. You will be prompted for the password for this account. Type the password and press Enter.
You will be presented with the command line prompt of the remote computer.
To start a graphical application enter its name on the command line with any parameters you want to pass to it. We’re going to use the leafpad editor to edit the .bashrc file.
The leafpad editor will open with the .bashrc file loaded in it.
As another example, let’s start the epiphany browser.
The epiphany browser will open, and you can browse to a favorite website.
And yes, it works on Windows, too! Here we’ve launched the
idle python IDE on a remote Linux system. It appeared on our Windows desktop. Just launch it by typing its command like you would on Linux.
Note that it does not have the usual Windows window decorations. It is a Linux application running on your Windows desktop, with Linux window attributes, courtesy of PuTTY and the Xming X server.
Closing the Connection
To close the connection, close all applications then use the exit command in the PuTTY terminal window.
That’s Really Quite Impressive
To achieve something so alien as a functioning Linux application running quite happily on a Windows desktop, with a few easy steps, is nothing short of staggering.
- › How to Set Up Remote Desktop on Ubuntu
- › Here’s How Mozilla Thunderbird Is Making a Comeback in 2022
- › What Can You Do With the USB Port on Your Router?
- › Why Do I See “FBI Surveillance Van” in My Wi-Fi List?
- › ExpressVPN Review: An Easy-to-Use and Secure VPN for Most People
- › 10 Things Blocking Your Wi-Fi Signal at Home
- › 4 Ways to Ruin Your Smartphone’s Battery