Howto:Running Google Chrome as root | Fedora 15 | RHEL 6 | CentOS 6 | Ubuntu 11.04 | Linux

Hello,

I am back with one another post with a trick to Enable Google Chrome as Root.

As Google Chrome is available for Linux but because of some purposes they have disabled access of Google Chrome via Root user.

As I am working with a root user and also expecting that lots of users are working as a root and they wants to run google chrome as a root then this post will helps them.

There are some users who does not like to work as a root and they don’t recommend to work as a root, So i will request them to ignore this post.

This howto is tested on Testing Environment, I request you to follow if you are sure what its going to do, If something or anything anwhere goes wrong you’ll be the only responsible for the same. DO IT AT YOUR OWN RISK.

Now First Let’s look at the Error which you are getting when you try to run Google Chrome as a root. If you are getting error exact like below screenshot then follow this post it will helps you to enable Google Chrome as a root.

Google Chrome Error through root user

Google Chrome Error while running as a root user


Please perform following steps to Run Google Chrome as root.

0) Of Course, Google Chrome Must be installed.

1) You need to be root to perform this steps.

2) We require following package must be installed.

Fedora / Red Hat Users execute this command as root :- [root@tejas-barot-linux-ahmedabad ~]# yum -y install alacarte

Ubuntu Users execute this command as root :- [root@tejas-barot-linux-ahmedabad ~]# apt-get install alacarte

3) Once above package is installed Execute Following command as a root on your terminal

[root@tejas-barot-linux-ahmedabad ~]# alacarte

Once alacarte Window is opened Click on Applications and from Right Panel Select Google Chrome. Look at Below Screenshot.

Google Chrome as a root

Running Google Chrome as a root - Screenshot 1

4) On Google Chrome Menu click on Properties, You will able to see exact details like following screenshot.

Google Chrome Menu Properties

Google Chrome Menu Properties

5) Move to Command Text Box of Google Chrome Menu Properties.

Change this line from  /opt/google/chrome/google-chrome %U to /opt/google/chrome/google-chrome –user-data-dir %U. Look at screenshot below.

Enable Google Chrome as a root

Enable Google Chrome as a root

 

====> UPDATED : If This GUI Steps doesn’t work than do following Steps it will work. Thanks manish for your comment.

# vi /opt/google/chrome/google-chrome

and Find line exec -a “$0″ “$HERE/chrome” “$@” and change it to following

exec -a “$0″ “$HERE/chrome” “$@” –user-data-dir ( Two Hyphens at start of options )

Save and Close File

6) Now Close all windows, Don’t click on Revert.

7) Now Click on Applications -> Internet -> Google Chrome

8) That’s it. It will open Google Chrome as root.

9) If you want to run Google Chrome as root from Terminal then execute following command on Terminal.

google-chrome –user-data-dir

Hope guys this helps you. Waiting for your comments and Feedback.

If this works for your then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

Enjoy Google Chrome as root :) Enjoy Open Source :) Enjoy Linux :)

##########################################################################

Tejas Barot’s Latest Linux Quote :-

“There were so many viruses waiting outside of Computer Room,
I opened door,They came and went out very sadly, Because they didn’t find WindowZ,
Feel Protected, Be Protected, Use Linux and Open Source” –
Tejas Barot

For More Linux quotes by Tejas Barot please visit :- http://goo.gl/xb0nZ

##########################################################################

exec -a “$0″ “$HERE/chrome” “$@”

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Comments »

 
  • SecurityIsGood says:

    Thanks for the info Tejas. It’s always helpful to know your way around the permission structure of whatever application and OS you are running.

    With that being said and apologies to you for posting on the root user issue, I recommend that ‘folks using this info be careful when running anything as the all powerful Root. Especially on Internet functionality. There are idiots out there that would LOVE to find a Chrome instance running as root to play with. No need for a root-kit.

  • vineet says:

    @manish
    Instead of exec-a“$0″“$HERE/chrome”“$@”–user-data-dir$HOME using
    exec-a“$0″“$HERE/chrome”“$@”–user-data-dir Worked for me

  • manish says:

    1) Go to /opt/google/chrome
    2) Open google-chrome file. Find exec -a “$0″ “$HERE/chrome” “$@”
    3) Replace it to exec -a “$0″ “$HERE/chrome” “$@” –user-data-dir $HOME
    Now open google chrome from Application>>Internet>>Google Chrome
    bang Its done!! :)

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*