To resolve the issue you need to specify an X-11 server on the host machine to handle the launch of GUId programs. And if the client is a Windows then install Xming . Also note if the client is a Linux machine install XQuartz.
Now if this is Windows client connecting to Linux. And to launch X11 programs over putty do the following steps:
- Firstly launch XMing on Windows client
- After that launch Putty
* Enter the basic options as you know in session category
* Connection -> SSH -> X11
-> Must Enable X11 forwarding
-> Update X display location = :0.0
-> Update MIT-Magic-Cookie-1
-> Lastly X authority file for local display = point to the Xming.exe executable
Now the ssh server should have permitted Desktop Sharing "Allow other user to view your desktop".
And MobaXterm and other complete remote desktop programs also will work.