When you try to run Google Chrome as root on CentOS, you will get the message "Google chrome can not be run as root".
This is because running Chrome as root you might end up corrupting important files and folders.
The workaround is to specify an alternate "--user-data-dir" for storage of profile information.
Follow the below steps to achieve this.
1. Open google-chrome in your favorite editor, eg nano:
# nano $(which google-chrome)
2. Add --user-data-dir at the very end of the file.
It might look something like this:
exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \ "$@"
3. Save, and close the editor.
- Written by Sorin Srbu
- Hits: 60