Google Chrome can not be run as root


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.
意思是Chrome不允许在root下运行,由于这是VPS不是自家电脑,因此不适合换用户,寻觅网络试过很多方法,
比如修改FLAGS之类的都失败,最后找到个不错的方法,在此分享下。
首先需要安装十六进制编辑器
# apt-get -y install hexedit
然后使用编辑器编辑Chrome
# hexedit /opt/google/chrome/chrome
注意:路径如果不同的话请自行使用dpkg -c 安装包来察看安装到哪里了。
进入到编辑器后,光标在左侧,首先按TAB键切换到右侧的ASCII码模式位置,
接着按Ctrl+S打开搜索功能,输入geteuid查找,当光标停到首字母的地方后,
直接将geteuid替换输入成getppid就修改完成了,最后按Ctrl+X保存确认退出。
重新打开Chrome,即可正常运行。

相关内容

    暂无相关文章