[root@localhost bin]# /usr/bin/google-chrome
[8239:8239:1230/172329.621009:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
(1)ssh命令行
所以想办法在启动中去除sandbox即可
root@localhost bin]# google-chrome --no-sandbox
(google-chrome:8256): Gtk-WARNING **: 17:23:48.733: cannot open display:
[1230/172348.742570:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
上段提示,没有display,原因是我们执行ssh,不就是gui
(2)GUI里
在快捷方式属性里,后面加上 --no-sandbox就行了
(3)如果使用robotframework执行机、远程selenium server 上的chrome,则会需要改chrome的启动参数
启动文件位置:/opt/google/chrome/google-chrome
翻到最后,修改如下:
#exec -a "$0" "$HERE/chrome" "$@"
exec -a "$0" "$HERE/chrome" "$@" --no-sandbox $HOME
这样就能远程调用chrome的执行机了