google chrome can not be run as root
来源:互联网 发布:三国杀里技能知仁 编辑:程序博客网 时间:2024/05/29 17:04
在Ubuntu中使用root用户登录后,再安装chrome浏览器,有时可能出现google chrome can not be run as root的错误。
这时有两个解决方法,可以都试下。
方法1:
以root用户登录后,安装hexedit:
apt-get install hexedit
然后把/opt/google/chrome/目录下的chrome文件拷贝到root的根目录下,这是因为不能直接在原目录下修改文件chrome:
cp -r /opt/google/chrome/chrome /root/
然后用hexedit打开刚才复制出来的chrome文件:
hexedit chrome
打开后首先按TAB键,然后按下Ctrl + S进行搜索,输入搜索词:geteuid,
按下回车后,会自动跳到目标所在的地方,接着输入getppid,把原文件中的geteuid换成getppid。
然后按下Ctrl + X保存退出。
接着把修改后的chrome文件复制回原来的地方,覆盖掉原文件:
cp -r /root/chrome /opt/google/chrome/
到这里就完成了。
如果用了上面这个方法后还是会出现这个错误,则在保留上面修改的同时,用下下面的方法。
第二个种方法:
以root身份登陆后,用gedit打开/opt/google/chrome/目录下的google-chrome文件:
gedit /opt/google/chrome/google-chrome
接着来到这个文件的末尾,找到
exec -a "$0" "HERE/chrome" "$@"
把这行替换成下面这行:
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir $HOME
保存并退出。
到这里应该就可以了。
1 0
- Google Chrome can not be run as root 解决办法
- Google Chrome can not be run as root (redhat6)
- ubuntu Google Chrome can not be run as root
- google-chrome can not be run as root
- ubuntu13.10: google chrome can not be run as root
- google chrome can not be run as root
- Google Chrome can not be run as root 【不能以根用户身份运行 Google Chrome】
- Ubuntu运行Chrome出现“Google Chrome can not be run as root”的解决方法
- Ubuntu运行Chrome出现“Google Chrome can not be run as root”的解决方法
- ubuntu google chorme can not be run as root
- Chromium can not be run as root错误
- chromium can not run as root
- 解决Linux下出现Google Chrome does not run as root问题
- can not run elasticsearch as root at org.elasticsearch.boots
- VLC is not supposed to be run as root. 问题解决
- root用户无法运行tor解决办法(The tor browser bundle should not be run as root )
- CentOS安装Chrome及Please start Google Chrome as a normal user. To run as root, you must specify an ...
- pg_ctl: cannot be run as root
- 展望未来,总结过去10年的程序员生涯,给程序员小弟弟小妹妹们的一些总结性忠告
- 提高C#编程水平的50个要点
- Mac下Android Studio subversion 集成的问题
- spring学习笔记(3)——配置文件applicationContext.xml的加载
- 电信 IP 网管接入文档
- google chrome can not be run as root
- C++第四章 习题
- C#高级编程三十天----泛型结构,泛型方法,泛型委托
- HttpUrlconnection POST提交 用于接口调用传参
- ACdream 1112 Alice and Bob (博弈&&素数筛选优化)
- 杭电1005 Number Sequence
- 毕业五年决定你的命运
- 2015062807 - EffactiveJava笔记 - 第42条 慎用可变参数
- OJ期末模考A