Can’t open graphical display , putty session using Xclock or RunInstaller

Linux graphical display, can’t open display logging on to putty session

I have logged on from a windows client with putty, and and I have set “Enable X11 forwarding” in putty session and started Xming on my client.

Testing for example with xclock or Oracle’s RunInstaller after putty logon to linux server, I just get “Error: Can’t open display”.

Env. variable DISPLAY was not set. Setting DISPLAY manually did not solve problem:

$ env | grep DISPLAY
DISPLAY=localhost:10.0

Tried as well with setting client ip instead of localhost and verified that the following parameter was set in the /etc/ssh/sshd_config file, but no change.

X11Forwarding yes

Installing xauth did however solve the problem. DISPLAY was further set automatically on putty logon after auth install:

# yum whatprovides xclock

# yum whatprovides xauth

#yum install xauth

#yum install xclock

If first linux server is used as a jump host to navigate to another linux server, and one would like to use a graphical interface as well on second server, one should log on to second linux server from first linux server using “ssh -X”

$ssh -X username@second_linux_server

Tested on Centos 7 and Ubuntu 16

Leave a Reply

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