centos7 中启动chrome时无法启动的问题,打开chrome,没反应,自行关闭

编程知识 更新时间:2023-05-02 19:08:48

[root@localhost bin]# /usr/bin/google-chrome
[8239:8239:1230/172329.621009:ERROR:zygote_host_impl_linux(89)] Running as root without --no-sandbox is not supported. See https://crbug/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(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的执行机了

更多推荐

centos7 中启动chrome时无法启动的问题,打开chrome,没反应,自行关闭

本文发布于:2023-04-28 04:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/04d7e2efe6507342c7db3360632c36b8.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法启动   chrome

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 107723文章数
  • 27240阅读数
  • 0评论数