I have installed Google Chrome in Ubuntu 10.10. When I try to use in normal user, it is working fine.
Now if I want to use as a root it gives the following error:
Google Chrome does not run as root
Also when I tried the following command in terminal, it opens Google Chrome:
google-chrome --user-data-dir
I need a permanent solution for this. Can anybody give me idea about this?
(Permanent Method)
Edit the file with any text editor (I used Leafpad) Run this code your terminal
leafpad/opt/google/chrome/google-chrome
(Normally its end line) find
exec -a "$0" "$HERE/chrome" "$@"
orexec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \ "$@"
exec -a "$0" "$HERE/chrome" "$@" --no-sandbox --user-data-dir
(Just Simple Method)
Run This command in your terminal
Or
Chrome can run as root (remember to use
gksu
when doing so) so long as you provide it with a profile directory.Rather than type in the profile directory every time you want to run it, create a new bash file (I'd name it something like
start-chrome.sh
)Rember to call that script with root privelages!
Just replace following line
with
all things will be right.