Ubuntu16 Root后Chrome无法运行解决方法

1.启动Chrome
/usr/bin/google-chrome
会报错:
[31560:31560:0207/085601.085852:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

  1. 使用者 /usr/bin/google-chrome --no-sandbox 能够启动但是还是报错:
    [31568:31664:0207/085622.436523:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [31568:31568:0207/085624.050190:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.

(google-chrome:31568): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Unknown or unsupported transport 'disabled' for address 'disabled:'
root@node00:~# [0207/085735.495265:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly

  1. 修改 /usr/bin/google-chrome文件
    将 exec -a "$0" "$HERE/chrome" "$@" 改为
    exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox
    就可以直接启动了

你可能感兴趣的:(Ubuntu16 Root后Chrome无法运行解决方法)