gpt4 book ai didi

linux - 无法打开 x11 显示 : unable to connect

转载 作者:IT王子 更新时间:2023-10-29 01:16:07 26 4
gpt4 key购买 nike

支持图形显示的服务器与我进入的服务器不同。当我尝试打开 virtualbox 时,我收到这条消息。

$ Failed to open the X11 display!  

当我尝试启动 x 时,收到三条错误消息。

$ PAM authentication failed, cannot start X server

$ giving up.
$ xinit: No such file or directory (errno 2): unable to connect to X server
$ xinit: No such process (errno 3): Server error.

我不知道显示变量在哪里,因为我是 linux 的新手。任何直接的建议和帮助将不胜感激。

最佳答案

在命令行上提供选项 -X 以启用 X11 转发(图形界面)。

ssh -X user@hostname

也可以通过在配置文件 (~/.ssh/config) 中将“ForwardX11”设置为“yes”来为每个主机启用它。还需要在目标服务器的 sshd 配置文件 (/etc/ssh/sshd_config) 中使用选项 X11Forwarding yes 启用对 X11 转发的支持。

您还应该知道启用 X11 转发有一些安全隐患。从 ssh 和 sshd 手册页或 here 中阅读更多内容.如果您同时控制服务器和客户端并平等信任两者,则启用转发应该没有任何问题。

关于linux - 无法打开 x11 显示 : unable to connect,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14540457/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com