您的位置:首页 > 编程语言 > Go语言

Google Chrome can not be run as root 解决办法

2012-01-13 11:34 423 查看
系统环境:Fedora13

问题描述:原本在panbin这个用户登录的情况下安装的chrome,在panbin这个用户登录的时候可以正常使用。

当使用root用户登录,打开chrome时提示以下错误:

Google Chrome can not be run as root.

Please start Google Chrome as a normal user.

To run as root, you must specify an alternate --user-data-dir for storage of profile information.

这个问题在网上有很多人在问,而且解决方法都是一样:用hexedit去编辑chrome文件,把geteuid改为getppid,过程如下:

1.搜索并安装hexedit:

#yum list hexedit

发现有这个包:

hexedit.i686 1.2.12-11.fc12 @fedora

于是安装:

#yum install hexedit.i686

2.用hexedit修改/opt/google/chrome/chrome文件

这里按照网上说的方法修改,提示文件为只读,不管用chmod怎么修改权限,还是提示只读。这里采用以下方法:

#cp chrome /root/

#hexedit /root/chrome

这样便可以修改/root/目录下的chrome了,打开chrome,按Tab键,再按Ctrl+s搜索geteuid,找到后,直接输入getppid,将会覆盖掉geteuid,最后按Ctrl+x保存。

3.将/root目录下的chrome复制回/opt/google/chrome/,覆盖掉原来的chrome文件即可。打开chome,现在可以正常使用了。

为什么这样改,原理我还不清楚。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: