Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
2  
Why would you want to run Chrome, or any browser, as root? –  Keith Thompson Jul 29 '12 at 4:13

3 Answers 3

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
5  
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
1  
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

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

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

(click)

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

right mouse button click on Chromium Desktop icon
->properties
->application

On command: type

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

or

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
up vote 4 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. http://crbug.com/24120
 40 export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
 41 
 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
1  
Thanks @max it helped. :) –  Pratik Apr 4 '13 at 6:30
    
It helped me a ... –  user2086641 Sep 21 '13 at 12:31

Your Answer

 
discard

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.