5YrsLaterDBA
5YrsLaterDBA

Reputation: 34820

putty + xming: cannot connect to Xserver in Windows 7

I am trying to use putty and XMing to run programs from my Fedora 20. I used this configuration before on other machines and I was able to run GUI programs on Linux and display them in my windows 7. But this time I have trouble and get the "cannot connect to X server" error when I try to launch kwrite and kdesvn which are GUI programs in Fedora 20. The connections were good. And the XMing server was running and the X11 forwarding was enabled in putty, like the instruction here.

From my another Fedora 20 machine, I was able to connect to and run GUI programs from the target machine with ssh -X and the same username. So I am thinking the settings of the target machine was right.

Then what else I can try? how to figure out where the problem is?

Upvotes: 0

Views: 12658

Answers (3)

Aaron
Aaron

Reputation: 11

I had a problem much like this, what happened to me was that my DISPLAY was being set elsewhere. If you can, try opening a new settion via putty from the same Windows machine using another user and then checking the display and testing your GUI programs

Another thing would be to use your own user but remove any custom work you may have done in your configuration, login fresh, check the DISPLAY and then test X

Upvotes: 1

SeeJayEmm
SeeJayEmm

Reputation: 111

Ensure that X11 forwarding is enabled in /etc/sshd_config.

X11Forwarding yes

Ensure in your home directory that you have an .Xauthority file. Permissions should be set 0600. If the file does not exist create it.

touch ~/.Xauthority
chmod 0600 ~/.Xauthority

As was previous stated first make sure that X11 forwarding is enabled in PuTTY. Config > Connection > SSH > X11 > Enable X11 Forwarding. Based on your question it appears you already did this. Make sure you save this config.

Upvotes: 1

Queasy
Queasy

Reputation: 131

Did you enable X11 in putty?

It's under SSH | X11 | Enable X11 Forwarding

Then save the putty profile and click on session | save | open

Should work perfectly after you make those changes.

Upvotes: 0

Related Questions