Use Google chrome as root

I do not know if this is the case of not… but I assume you have installed LAMP and only know that web pages can be stored in /srv. Accessing web pages from /srv, you either need to be root or change /srv permissions so that other users can use it, which is not need if you know(again, I do not know because you have not specified anything “specifically”) that you can put your pages in /home/username/public_html and access those pages from any web browser using location “localhost/~username/”. If you have stored your pages in /srv you just need “localhost” in web browser, but keeping them in public_html and testing from there is much safer and better way IMHO.

When you come to forums, you should be ready to “listen” because you are asking for “help”. There may be replies that you do not like… even I had that encounters, but you need to be much more patient when working you have “chosen” to work in a “community”. All open source work in “community” work. You should be ready to “convince” others and also “listen” to them in turn, and then do what you want to do, ultimately.

On 12/30/2011 06:34 AM, phanisvara das wrote:
> to get the browser to execute php files does not require it to run as
> root. if this happens to you, your web server, without which php can not
> be executed in a browser at all, isn’t configured correctly.

or a previous instance of ‘testing’ the php by using a root browser
has already so screwed the permissions that only root can access them
again.


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

On Fri, 30 Dec 2011 13:03:06 +0530, DenverD
<DenverD@no-mx.forums.opensuse.org> wrote:

> On 12/30/2011 06:34 AM, phanisvara das wrote:
>> to get the browser to execute php files does not require it to run as
>> root. if this happens to you, your web server, without which php can not
>> be executed in a browser at all, isn’t configured correctly.
>
> or a previous instance of ‘testing’ the php by using a root browser
> has already so screwed the permissions that only root can access them
> again.
>

that, of course, is a distinct possibility which i didn’t think of. if
that’s the case, there’s some serious checking of file permissions in
various places required, which i feel only very little enthusiasm to get
into. that’s the reason everybody insists NOT to do things as root.


phani.

@luk4abinash

I don’t mind helping you be stupid, although I doubt you’ll need my help for that. But is that so much to ask that you write “you are” instead of “u r”, out of consideration for the users who make efforts to communicate with each other in english? And could you please think of the possibility that you’re not just talking to 11 years kids trying to gain root access to their school computer? Nevertheless, I agree that it should not be Chromium’s job to prevent people from being stupid - by using such a stupid trick by the way. So I can show you the trick … but only if you promise not to call me “dude” (!).

Now I understand your username :wink:

Since you know the risks:

Create a folder for chrome to use as a data directory; suppose it’s at /home/yourname/Desktop/xxx. Then open a terminal window and su to root and enter this command:

google-chrome --user-data-dir=/home/yourname/Desktop/xxx

A small window will open asking you to choose a search provider. Supply the answer. Then chrome will open (as root user).

PS: that’s for chrome, not chromium (I use chrome, you asked for chrome).

Now that you have been warned and re-warned and that it’s not a secret anymore. …

chromium: it works too. Alternatively, you can also patch /usr/bin/chromium:

sed -i '/exec $LIBDIR/s/$/ "--user-data-dir"/' /usr/bin/chromium

Then you don’t need to create a folder nor answer anything. Chromium will use ~/.config/chromium, as for a normal user.

  • Reverse the change when you don’t need it anymore (but it won’t survive the next update anyway).

On 12/30/2011 01:56 PM, please try again wrote:
>
> Now that you have been warned and re-warned and that it’s not a secret
> anymore. …

u 2 r some cool dudes!


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

No prob bob! Don’t forget to put this command in your after.local if you wanna google as root for the rest of your life (which might be shorter in this case) … and dude’s your uncle (for sure)!

On Thu, 29 Dec 2011 12:36:03 GMT, luk4abinash
<luk4abinash@no-mx.forums.opensuse.org> wrote:

>
>if u r replying or not. i am going to do it any how. and this is open
>source and i know the risk of using a browser as root

If you want to play Russian roulette, you can do that as well. Just the
same, i cannot see any possible reason to use any browser as root. If you
think you have valid reason to do so i would like to hear it.

?-/