前述

由于日常维护服务器时,系统为最小化安装不附带图形化界面。故ssh登录时会提示如下信息:

WARNING! The remote SSH server rejected X11 forwarding request.

问题呈现

此处测试可图形化界面的firefox命令,发现无法找到DISPLAY值并且为空。

[root@master-all ~]# firefox
Failed to open connection to "session" message bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Running without a11y support!
Error: no DISPLAY environment variable specified
[root@master-all ~]# echo $DISPLAY

解决方法

执行如下命令,并重启机器:

[root@master-all ~]# yum -y install xorg-x11-xauth
[root@master-all ~]# reboot

验证问题

机器重启后查看DISPLAY值,并运行Firefox进行测试。

[root@master-all ~]# echo $DISPLAY 
localhost:10.0
[root@master-all ~]# firefox
Failed to open connection to "session" message bus: /usr/bin/dbus-launch terminated abnormally without any error message
Running without a11y support!
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

##### 上方执行firefox执行报错解决

[root@master-all ~]# yum -y install mesa-libGLw-devel mesa-dri-drivers mesa-libGLES-devel

到此,该问题已结束。

END

本文标题:无图形化不能使用X11 Forwarding解决方法

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/linux/20211584.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2021 年 06 月 15 日
如果觉得我的文章对你有用,请随意赞赏