我一直在搜索 StackExchange 和其他地方一段时间了。似乎没有任何修复对我有用(或仅修复部分问题)。
我正在尝试进入正在运行的 Raspberry Pi 3Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv71. 我试图将它用作服务器,并将我的 Windows 10 Pro 桌面用作客户端(通过 Ubuntu Windows 10 终端应用程序)。通过 PuTTY 执行此操作,启用 X11 转发,效果很好。但是,通过使用 Ubuntu 应用程序执行此操作ssh -X -v user@server,然后使用 xlogo 对其进行测试,只会出现Error: Can't open display:.
我在登录后通过ssh找到这个在调试的X11转发:debug1: X11 forwarding requested but DISPLAY not set。当我echo $DISPLAY在登录时运行时,结果是一个空行。
我在服务器的/etc/ssh/sshd_config文件上设置了以下选项:
Port 22
Address Family inet
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
Run Code Online (Sandbox Code Playgroud)
该命令 …