Chromium can not be run as root.
Please start Chromium as a normal user. To run as root, you must specify an alternate –user-data-dir for storage of profile information.
首先需要安装十六进制编辑器
- # apt-get -y install hexedit
找到chromium的安装位置
默认为 /usr/bin
然后使用编辑器编辑 Chromium browser
hexedit /usr/lib/chromium-browser/chromium-browser
进入到编辑器后,光标在左侧,首先按TAB键切换到右侧的ASCII码模式,接着按Ctrl+S打开搜索功能,输入geteuid查找,当光标停到首字母的地方后,直接输入getppid就能修改了,最后按Ctrl+X保存退出。
重新打开Chromium,正常运行。
后记:不仅是Chromium,Chrome(/opt/google/chrome/chrome )也同样适用,不过相对文件位置有所不同。
Tab键切换至右侧ASCII模式,Ctrl+S搜索geteuid,将其改为getppid后保存
顺便讲一下,HexEdit是一款十六进制的编辑器。
移动(Moving) | |
, | 移动到文件首部/尾部(go to start/end of the file) |
→ | 下一个字符(next character) |
← | 上一个字符(previous character) |
↑ | 上一行(previous line) |
↓ | 下一行(next line) |
Home | 行首(beginning of line) |
End | 行尾(end of line) |
PageUp | 上一页(page forward) |
PageDown | 下一页(page backward) |
杂项(Miscellaneous) | |
F1 | 帮助(help) |
F2 | 保存(save) |
F3 | 载入(load file) |
Ctrl+X | 保存并退出(save and exit) |
Ctrl+C | 不保存退出(exit without save) |
Tab | 十六进制/ASCII码切换(toggle hex/ascii) |
Backspace | 撤销前一个字符(undo previous character) |
Ctrl+U | 撤销全部操作(undo all) |
Ctrl+S | 向下查找(search forward) |
Ctrl+R | 向上查找(search forward) |
复制/粘贴(Cut/Paste) | |
Esc+W | 复制(copy) |
Ctrl+Y | 粘贴(paste) |