带有X11向前的SSH遥控器:$显示不匹配

发布于 2025-01-26 04:31:23 字数 759 浏览 3 评论 0原文

我只是遵循此链接中的步骤,为SSH设置我的VSCODE ENV:

vs代码远程x11连接到远程服务器时无法显示显示

在步骤4.2之前,所有情况都很好,当我尝试测试GUI是否可以正常工作时,错误msg是错误的msg反馈我就像“无法打开显示:xx.xxx.xxx.xxx:10.0”,

然后我在vscode中选中了“输出”选项卡(远程x11),第三行显示了“ display = xx.xxx.xxx.xxx.xxx:11.11.0.11.0 “

我进行了一些测试,例如在不关闭旧连接的情况下进行了新连接,然后在新终端上,$ display返回xx.xxx.xxx.xxx:12.0,相同的输出选项卡变成了“ display = xx.xxx.xxx” .xxx:13.0“

看起来数字将有序更新,但是如果两个显示变量完全相同,则GUI函数应该可以工作。 (我可以使用“ Xeyes -display xx.xxx.xxx.xxx.xxx:13.0”)

我不确定是否有任何设置可以解决这种奇怪的情况,现在它的作用类似这样的东西。

还有一件事,我不允许修改服务器变量,因此我无法通过命令“导出display = ...”修复此操作,请告诉我任何可能的事情,我可能会做错事。

衷心希望如果有人能提供帮助,谢谢。

I just followed the steps in this link to set up my vscode env for ssh:

VS code remote x11 cant get DISPLAY while connecting to remote server

All the things go well before the step 4.2, when I tried to test if the GUI can work well, an error msg feedbacked me like "Can't open display: xx.xxx.xxx.xxx:10.0"

Then I checked the output tab(Remote X11) in vscode, the 3rd line shows that "DISPLAY = xx.xxx.xxx.xxx:11.0"

I did some tests, like made a new connection without closing the old one, then on the new terminal, $DISPLAY returned xx.xxx.xxx.xxx:12.0 and the same output tab msg became "DISPLAY = xx.xxx.xxx.xxx:13.0"

It looks like the number would update orderly, but GUI function is supposed to work if the two DISPLAY variables are exactly the same. (I can make it by using "xeyes -display xx.xxx.xxx.xxx:13.0")

I am not sure if any setting can fix this weird situation, now it acts like the remote x11 connects after the ssh connection is done or something like that.

One more thing, I am not allowed to modify the server variable so I cannot fix this by the command "export DISPLAY=...", please tell me anything possible I might did it wrong to cause this.

Sincerely wish if anyone can help, thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文