redhat 7
yum install firefox xorg-x11-xauth mesa-libGLES-devel.x86_64 mesa-dri-drivers
vi /etc/ssh/sshd_config
X11Forwarding yes #需要打开,且确保是yes
X11UseLocalhost no ##禁止将X11转发请求绑定到本地回环地址上
systemctl restart sshd
vim ~/.bash_profile
unset LIBGL_ALWAYS_INDIRECT
最后执行
firefox
redhat 8
yum install firefox xorg-x11-xauth mesa-dri-drivers
vi /etc/ssh/sshd_config
X11Forwarding yes
X11UseLocalhost no #注释掉,或者保持为no,否则ssh登录非常卡。
systemctl restart sshd
vim ~/.bash_profile
unset LIBGL_ALWAYS_INDIRECT
然后ssh登录后,执行下面命令
export DISPLAY=yourmachine.yourdomain.com:0.0
比如
export DISPLAY=10.11.11.99:0.0
最后执行
firefox