我需要从‘ceres’获取一个 x 窗口以显示在‘nathanb-box’上,而无需通过 ssh 隧道传输 X。
[nathanb@nathanb-box ~] xhost +ceres
ceres being added to access control list
[nathanb@nathanb-box ~] xhost +ceres.foo.com
ceres.foo.com being added to access control list
[nathanb@nathanb-box ~] echo $DISPLAY
:0.0
[nathanb@nathanb-box ~] xauth list | grep nathanb
nathanb-box.foo.com:0 MIT-MAGIC-COOKIE-1 a27ad72172460013c07e3a31b0d7d6da
在谷神星上……
[nathanb@ceres ~] export DISPLAY=nathanb-box.foo.com:0.0
[nathanb@ceres ~] xauth list | grep nathanb
nathanb-box.foo.com:0 MIT-MAGIC-COOKIE-1 a27ad72172460013c07e3a31b0d7d6da
[nathanb@ceres ~] xterm
xterm Xt error: Can't open display: nathanb-box.foo.com:0.0
我错过了什么?
谢谢,内森
答案1
原来 X 是用 -nolisten tcp 启动的。我从
/etc/X11/xinit/xserverrc
而且效果非常好。