为什么我无法导出 Linux DISPLAY?

Spi*_*rit 5 display

我遇到了这个问题,我不知道为什么。有很多相关的问题,但没有一个对我有帮助。

我有两个虚拟机:
CentOS 7 with GNOME 192.168.1.53
Mint 17.1 Rebbeca with XFCE 192.168.1.54

我知道默认情况下导出显示应该是严格的,例如:

#While I am Logged in on the desktop on the MINT:
user@mint:~$ xhost +

#I am SSHing to the Centos from the MINT
user@mint:~$ ssh -XY root@192.168.1.53

#At the CentOS I export the display 
[root@cent ~]$ export DISPLAY=192.168.1.54:0.0
[root@cent ~]$ echo $DISPLAY
192.168.1.54:0.0

#Trying to start a simple program but I get an error message instead:
[root@cent ~]$ xclock
Error: Can't open display: 192.168.1.54:0.0
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

我在许多论坛上尝试了这些建议,但仍然收到错误消息。我还尝试将显示从 Mint 导出到 Centos(相反的方式),但我仍然遇到相同的错误,但这次是在 Mint 上。

错误是不是因为一个系统有 XFCE 而另一个系统有 GNOME?
我认为可能有一些默认安全设置对我不知道的一个/两个发行版有效。

我还尝试按照此处的/etc/gdm/custom.conf说明在 CentOS 上编辑:http :
//www.softpanorama.org/Xwindows/Troubleshooting/can_not_open_display.shtml

Cir*_*Cat 10

您正在尝试通过 SSH 创建 X 隧道,然后通过指定绕过 SSH 隧道的 IP 地址来覆盖它。这不起作用。当进行 SSH 隧道时,SSH 通过在与它对话的每台机器上的 localhost 上打开一个端口来处理本地和远程 IP 地址之间的数据传输。您无法指定任何一台计算机的 IP 地址。

您需要导出通过 SSH 隧道传输的显示,这意味着export DISPLAY=localhost:x.y,当您使用 ssh -X 连接时,这应该会自动为您完成。