简体   繁体   English

油灰+ xming:无法连接到Windows 7中的Xserver

[英]putty + xming: cannot connect to Xserver in Windows 7

I am trying to use putty and XMing to run programs from my Fedora 20 . 我正在尝试使用腻子XMing运行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 . 我以前在其他计算机上使用过此配置,并且能够在Linux上运行GUI程序并在Windows 7中显示它们。但是,这一次我遇到麻烦,尝试启动kwrite和时出现“ 无法连接到X服务器 ”错误。 kdesvnFedora 20中的GUI程序。 The connections were good. 连接很好。 And the XMing server was running and the X11 forwarding was enabled in putty, like the instruction here . Xming的服务器运行和X11转发腻子已启用,像指令在这里

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. 在另一台Fedora 20机器上,我可以使用ssh -X和相同的用户名连接到目标机器并从其运行GUI程序。 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? 如何找出问题所在?

Ensure that X11 forwarding is enabled in /etc/sshd_config. 确保在/ etc / sshd_config中启用了X11转发。

X11Forwarding yes

Ensure in your home directory that you have an .Xauthority file. 确保您的主目录中有一个.Xauthority文件。 Permissions should be set 0600. If the file does not exist create it. 权限应设置为0600。如果文件不存在,请创建它。

touch ~/.Xauthority
chmod 0600 ~/.Xauthority

As was previous stated first make sure that X11 forwarding is enabled in PuTTY. 如前所述,首先确保在PuTTY中启用X11转发。 Config > Connection > SSH > X11 > Enable X11 Forwarding. 配置>连接> SSH> X11>启用X11转发。 Based on your question it appears you already did this. 根据您的问题,看来您已经这样做了。 Make sure you save this config. 确保保存此配置。

I had a problem much like this, what happened to me was that my DISPLAY was being set elsewhere. 我遇到了类似这样的问题,发生的事情是我的DISPLAY被放置在其他地方。 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 如果可以,请尝试使用其他用户在同一台​​Windows计算机上通过腻子打开新设置,然后检查显示并测试GUI程序

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 另一件事是使用您自己的用户,但删除您可能在配置中完成的所有自定义工作,重新登录,检查DISPLAY,然后测试X

Did you enable X11 in putty? 您是否在腻子中启用了X11?

It's under SSH | 在SSH下| X11 | X11 | Enable X11 Forwarding 启用X11转发

Then save the putty profile and click on session | 然后保存油灰轮廓并单击会话| save | 保存 open 打开

Should work perfectly after you make those changes. 进行这些更改后,应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM