General Middleware

X11 Forwarding and Setup for Linux Servers

To export your DISPLAY from Linux server to your workstation, you need to have:

  1. Putty
  2. XMing
  3. Root Privileges on the Linux Server

Please follow the below steps:

  1. Install XMing which acts as the X server in your workstation. You can use the link -> https://sourceforge.net/projects/xming/
  2. Start the XLaunch and choose the correct Display Number in the first screen. Let all other options be the default.
  3. Open up Putty and make sure X11 forwarding under Connection -> SSH -> X11 is enabled and “X display location” is set to “localhost:10:0” -> Note that the number 10 denotes the Display number in my case. You can choose your own, but make sure it is the same in Putty and in XMing.
  4. Login to the Linux Server and install the xorg* packages as root -> yum install xorg*
  5. Make sure X11Forwarding is set to yes in the file /etc/ssh/ssh_config
  6. Logout and login to the Linux Server again and check if you have proper output displayed for the below commands:

=>xauth list

rtdb2prt5e003.visa.com/unix:10 MIT-MAGIC-COOKIE-1 93ba85d9632b2f7d8604850b594ada70

=>echo $DISPLAY

localhost:10.0

The DISPLAY number in the second command should match the one you are using for Putty and XMing.

You can add your /home/<user>/.Xauthority file to any other user, if you want to run a program with the other user.

In case you just want to test this configure, but don’t have any real server setup, feel free to watch this video to configure Virtual machine in your desktop : https://youtu.be/2pxEQlEpmh4

2 thoughts on “X11 Forwarding and Setup for Linux Servers

Leave a Reply

Your email address will not be published. Required fields are marked *