Author Photo

Ahmer's SysAdmin Recipes is a blog for Linux System Administrators. This blog provides recipes for Installation & Configuration of Linux, Ubuntu, Oracle Database, MySQL, Apache, Nginx, Oracle Cloud Control, FreeIPA, Kerberos & OpenLDAP, Subversion, PXE, DevOps, etc. over Red Hat Enterprise Linux (RHEL), CentOS, Ubuntu and Windows.

Please give me your feedback and help me improve this blog. Please let me know If you want me to write on a specific topic.

Wednesday, 2 January 2019

Configure X11 Forwarding with PuTTY and Xming

Configure-X11-Forwarding-PuTTY-to-Xming-on-WindowsUsually, Graphical mode is turned off in Linux servers due to Security and Resource optimization. In such environments running a GUI application is not a trivial task. However, we can use PuTTY and XMing to forward X11 display to a windows client over SSH protocol.

In this article, we will first install required packages on our Linux Server, then we will configure XMing and PuTTY for X11 forwarding on Windows.

 

System Specification:

One Microsoft Windows client and a Linux server.

 

Required Software:

Download and Install following two software on Windows client.

- PuTTY
- XMing X Server for Windows

 

Install required packages on Linux server:

Connect to Linux machine and install necessary packages for X11 forwarding.

[root@junit-01 ~]# yum install -y xauth ... Installed: xorg-x11-xauth.x86_64 1:1.0.9-1.el7 Dependency Installed: libXmu.x86_64 0:1.1.2-2.el7 libXt.x86_64 0:1.1.5-3.el7 Complete!

We will require a Linux GUI application to test X11 forwarding configurations. Therefore, we are installing xclock to test the configuration.

[root@junit-01 ~]# yum install -y xclock ... Installed: xorg-x11-apps.x86_64 0:7.7-7.el7 Dependency Installed: libXaw.x86_64 0:1.0.13-4.el7 libXcursor.x86_64 0:1.1.15-1.el7 libXfixes.x86_64 0:5.0.3-1.el7 libXft.x86_64 0:2.3.2-2.el7 libXpm.x86_64 0:3.5.12-1.el7 libXxf86vm.x86_64 0:1.1.4-1.el7 libxkbfile.x86_64 0:1.0.9-3.el7 Complete!

 

Configure XMing:

After installing Xming on Windows run xlaunch application.

putty-configure-x11-forwarding-on-windows-01

putty-configure-x11-forwarding-on-windows-02

Default configuration will work for us. Therefore, click on Next.

putty-configure-x11-forwarding-on-windows-03

Click on Next.

putty-configure-x11-forwarding-on-windows-04

Click on Next.

putty-configure-x11-forwarding-on-windows-05

Click on Finish.

XMing application has been started and it is placed in System Tray of Windows.

 

Configure PuTTY:

Once installed, run PuTTY application.

putty-configure-x11-forwarding-on-windows-06

Add a session of our Linux machine therein.

putty-configure-x11-forwarding-on-windows-07

Besides other configuration, we are also required to configure X11 forwarding as follows:

putty-configure-x11-forwarding-on-windows-08

Save and open the session.

login as: root Authenticating with public key "rsa-key-20190101" Last login: Tue Jan 1 21:16:23 2019 from 192.168.116.1 /usr/bin/xauth: file /root/.Xauthority does not exist [root@junit-01 ~]# xclock

Xming will capture the Display open a window to run xclock application.

putty-configure-x11-forwarding-on-windows-09

We have successfully configured X11 forwarding using PuTTY and XMing.

Configure X11 Forwarding with PuTTY and Xming


YOU MIGHT ALSO LIKE:

No comments:

Post a Comment