2

I already asked this question on superuser, but the problem hasn't been solved yet. This problem really bothers me. I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.

SuperUser Question-- Link

Env: centos 7, xshell, xmanager.

I have two centos7 virtual machines, one of which can be successfully open Chrome Browser through X11 forwarding in SSH session, but another one can not.

The normal one:

[root@localhost ~]# google-chrome --no-sandbox
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
[16458:16458:0523/075723.020611:ERROR:gl_surface_glx.cc(419)] GLX 1.3 or later is required.
[16458:16458:0523/075723.020636:ERROR:gl_initializer_x11.cc(153)] GLSurfaceGLX::InitializeOneOff failed.
[16458:16458:0523/075723.022497:ERROR:gpu_child_thread.cc(254)] Exiting GPU process due to errors during initializat
[16393:16422:0523/075723.081833:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.
[root@localhost ~]# [0523/075728.166795:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandb
Most likely you need to configure your SUID sandbox correctly

The abnormal one:

WARNING! The remote SSH server rejected X11 forwarding request.

[root@yxs ~]# google-chrome --no-sandbox

(google-chrome:10346): Gtk-WARNING **: cannot open display: 
[root@yxs ~]# [0523/202401.444038:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
^C
[root@yxs ~]# su yxs
[yxs@yxs root]$ google-chrome

(google-chrome:10407): Gtk-WARNING **: cannot open display: 

The following configurations of the two are almost the same.

The normal one:

[root@localhost ~]# cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#   X11Forwarding no
[root@localhost ~]# rpm -qa | grep xauth
xorg-x11-xauth-1.0.9-1.el7.x86_64
[root@localhost ~]# ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013
[root@localhost ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@localhost ~]# echo $DISPLAY
localhost:10.0

#enable ipv6
#minimal centos

The abnormal one:

[root@yxs ~]# cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#   X11Forwarding no
[root@yxs ~]#  rpm -qa | grep xauth
xorg-x11-xauth-1.0.9-1.el7.x86_64
[root@yxs ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
[root@yxs ~]# echo $DISPLAY

[root@yxs ~]#

#disbale ipv6
#has installd "GNOME Desktop"

I tried to execute export DISPLAY=localhost:10.0 on the abnormal virtual machine, But when I reboot, the environment variable $DISPLAY became empty again.

I just can't open Chrome By command google-chrome --no-sandbox through SSH Session in Xshell. But I can use normally through the VNC window on the virtual machine management.

1

Just because I disable IPv6, I need to add AddressFamily inet to /etc/ssh/sshd_config., I was too careless before. I'm sorry.

The third answer: Link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.