也是搜索的,记录一下
想用右键打开html文件,总提示root无法运行chrome,在脚本里添加--user-data-dir也不管用,然后就找到这个直接修改二进制文件的方法,简单直接粗暴又有效
安装工具:hexedit
1、首先将chrome拷贝出来,否则即使是root用户也会不断提示文件只读,无法修改
cp /path/to/chrome /tmp/chrome
2、用hexedit修改/tmp/chrome
hexedit /tmp/chrome
按tab键跳到ascii码区域,ctrl+s 输入 geteuid后回车开始搜索,然后直接输入getppid将geteuid覆盖,ctrl+x进行保存
3、再将 /tmp/chrome 拷贝回去
cp /tmp/chrome /path/to/chrome
这样root就可以运行chrome了,包括右键打开文件也可以
阅读(1574) | 评论(0) | 转发(0) |