无图形化不能使用X11 Forwarding解决方法

来自:互联网
时间:2021-09-02
阅读:

由于日常维护服务器时,系统为最小化安装不附带图形化界面。故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
无图形化不能使用X11 Forwarding解决方法
上方执行firefox执行报错解决
[root@master-all ~]# yum -y install mesa-libGLw-devel mesa-dri-drivers mesa-libGLES-devel

到此,该问题已结束。

返回顶部
顶部