Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am facing one strange problem in my system. I am using CentOs 6.2 (linux)

being root it is not possible to open Google Chrome browser. It giving the error like this...

Google-Chrome error

Firefox is working fine in root.

but why chrome is showing the error like this?

share|improve this question
Why would you want to run Chrome, or any browser, as root? – Keith Thompson Jul 29 '12 at 4:13

I think the error message is self explainatory - chrome stores profile information under /home, and root has no home directory. You may need to run it with the --user-data-dir flag, and specify some location for this.

I'd note though, running a web browser as root is a HUGE security risk.

share|improve this answer
root does have a home dir, /root. – progo Jun 23 '12 at 17:30
Well, in which case, everything else is still probably valid. Storing user data in /root sounds potentially messy tho – Journeyman Geek Jun 24 '12 at 0:21
he's probably running it as 'sudo chrome', which would run as root in his current $HOME. But the main point is that running as root is dangerous (BAD user! BAD!). – lornix Jun 24 '12 at 7:59
up vote 6 down vote accepted

Edit /usr/bin/google-chrome and add –user-data-dir at the end of the last line

At first it was like this

 39 # We don't want bug-buddy intercepting our crashes.
 42 exec -a "$0" "$HERE/chrome" "$@" 

change line number 42 to like this

42 exec -a "$0" "$HERE/chrome" "$@" --user-data-dir

That's it now you can start google-chrome from root

share|improve this answer
Thanks a Lot Friend – K.K Patel Mar 21 '13 at 11:23
Thanks @max it helped. :) – Patriks Apr 4 '13 at 6:30
It helped me a ... – user2086641 Sep 21 '13 at 12:31

(or mkdir /home/chromie if you don't want to use /root)

or on file manager make directories chromie in /root and in /home


Kde start menu
chromium (right mouse button click)
Add to Desktop

right mouse button click on Chromium Desktop icon

On command: type

chromium chromium --user-data-dir=/root/chromie/


chromium chromium --user-data-dir=/home/chromie/

Chromium now starts when you are logged in as root

share|improve this answer
I tried your method its working, but it works only once. every time i have to write this google-chrome --user-data-dir=/home/chromie/ in the terminal. any other procedure to make it permanent. – max Aug 18 '12 at 12:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.