Google Chrome can not be run as root.

系统环境:BackTrack 5 r3 GNOME
问题描述:当使用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:
#apt-get hexedit
2.用hexedit修改/opt/google/chrome/chrome文件
这里按照网上说的方法修改,提示文件为只读,不管用chmod怎么修改权限,还是提示只读。这里采用以下方法:
#cp chrome /root/
#hexedit /root/chrome
这样便可以修改/root/目录下的chrome了,打开chrome,按Tab键,再按Ctrl+s搜索geteuid,找到后,直接输入getppid,将会覆盖掉
geteuid,最后按Ctrl+x保存。
ps:注意:路径如果不同的话请自行使用dpkg -c 安装包来察看安装到哪里了。
3.将/root目录下的chrome复制回/opt/google/chrome/,覆盖掉原来的chrome文件即可。打开chome,现在可以正常使用了。

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

本文由站长原创或收集,不代表本站立场,如若转载,请注明出处:http://www.yesck.com/post/517/

本文 暂无 评论

回复给

欢迎点评

联系我们

站长QQ:8117829

站长邮件:8117829@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code