X11 Forwarding Works On One Host, "Can't Open Display" On Other [PUTTY/XMING]
Got it to work in the end. In /etc/hosts there were the lines
1.2.3.4 server.lan
127.0.0.1 localhost
Reversing those lines so the localhost line was first stopped the errors
Related videos on Youtube
Toby Mao
Software engineer, platform architect, server harassing, coffee drinking, photo taking, music listening dog thing.
Updated on September 18, 2022Comments
-
Toby Mao over 1 year
I have two identical servers, server A and server B. If I connect to server A in Putty and enable X11 forwarding in the settings (running XMING on my PC), everything works fine. I can run all the test commands like 'xeyes' or 'xclock' and they work fine too.
However doing the exact same thing on server B results in a
Error: Can't open display: localhost:10.0
doing
echo $DISPLAY
on both servers returns the same (localhost:10.0) and both servers are on the same network so the firewall rules are identical (though I'm not sure this is relevant as the commands should go through SSH)
What should I try next to get X11 working on server B?
-
Toby Mao almost 13 yearsX11Forwarding is enabled in sshd_config, X11 has worked on this server before but it was a while ago I think