Setup X11 Forwarding to access GUI in Linux

While working with Linux OS over a ssh connection, you might be in a situation where you want to access GUI. In such situation either you can use tool like MobaXterm which has inbuilt support for X11 forwarding or you can use your own PuTTY which can support X11 forwarding if you have X11 display server installed on your system like Xming X Server. In this post we will go through steps to setup X11 forwarding to access GUI in Linux.

Step1: Download and Install Xming X Server

Download Xming X Server from sourceforge.net

Once you have downloaded Xming X Server, follow below step to install Xming on your system.

On running Xming setup you will get below screen

Click on Next > button

You can change Installation folder if you which to change it, by default it will get installed on C:\Program Files (x86)\Xming

Click on Next > button

If you want PuTTY also to be installed with Xming select Normal PuTTY Link SSH client else select Don't install an SSH client. 

If you are using Non US Keyboard you can check Non US Keyboard support or uncheck it.

You can uncheck XLaunch wizard - fronted for Xming and Run utility - start programs with hidden console window. 

Click on Next > button.

Xming shortcut in Start menu by default will get created under Xming folder, you can change folder name. If you do not want Xming shortcut in Start menu, you can check Don't create a Start Menu folder.

Click on Next > button

If you would like to have a desktop shortcut and Quick Launch icon you can check Create a desktop icon for Xming and Create a Quick Launch icon for Xming respectively.

Click on Next > button

On this screen you can verify yours installation configuration and if you want to modify it you can click on < Back button or else click on Install button to install Xming.

On successful completion of Xming you will get above screen, keep Launch Xming checked and click on Finish button to close installation wizard.

You can find below icon in notification area.

Step 2: Configure PuTTY for X11 forwarding

Open PuTTY

Expand SSH, click on X11.

Check Enable X11 forwarding and in X display location enter localhost:0.0

Click on Session enter Host Name (or IP address) and Port  and click on Open


Step 3: Test X11 forwarding

After successful login to server, execute xclock and you should see a clock pop up on your system.

If xclock is unavailable you can use also use gedit or firefox to test your X11 forwarding.




If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email.


12 comments: