General Middleware
X11 Forwarding and Setup for Linux Servers
To export your DISPLAY from Linux server to your workstation, you need to have:
- Putty
- XMing
- Root Privileges on the Linux Server
Please follow the below steps:
- Install XMing which acts as the X server in your workstation. You can use the link -> https://sourceforge.net/projects/xming/
- Start the XLaunch and choose the correct Display Number in the first screen. Let all other options be the default.
- 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.
- Login to the Linux Server and install the xorg* packages as root -> yum install xorg*
- Make sure X11Forwarding is set to yes in the file /etc/ssh/ssh_config
- 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
This is really useful and works perfectly. Thanks a ton.
Thanks. Please let me know if you need any additional content to focus on.