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

系统环境: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,现在可以正常使用了。


为什么这样改,原理我还不清楚。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值