How to run Chromium browser as root? (Solved)

Browsers, email, chat, etc.
Post Reply
Message
Author
trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

How to run Chromium browser as root? (Solved)

#1 Post by trueriver »

hi

first, is this the place to ask about installing chromium and applying custom command line args? If I am asking ijn the wrong place, please let me know. If you are a mod and use wizardly powers to move this q, please pm me to say where it has gone, ta.

OK, presenting problem is that chromium will not run as root, and as we know Puppy only (usually) runs as root.

Actually, chromium suggests a workaround, it will run as root if you provide it with a command line switch like --user-data-dir /foo/bar/my-chromium-stuff

So my question is, how do I configure Puppy to use this when I click on chromium in the internet section of the menu?

I am using Precise Puppy version 5.4.3, released Dec 2012; and the PPM has been recently updated. Machine is a Toshiba laptop of Vista vintage, running from Puppy installed onto a USB stick

Regards,
River~~

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#2 Post by 666philb »

hi trueriver

i think google chrome puts a script in /usr/bin .... open it in geany and edit it ..eg

Code: Select all

#!/bin/sh
exec /opt/google/chrome/google-chrome --user-data-dir=/root/.config/chrome
alternatively you can remove the 'won't run as root' thing entirely ..... scroll down to pemasus post http://www.murga-linux.com/puppy/viewtopic.php?t=86021
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

I think there is at least one other thread in this forum where the question was asked and answered. Possibly in the How-To section.

Using the forum Search I found this and this.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

I would suggest you use Iron 27 version
of Chrome browser either a pet or sfs
that can be downloaded with link from this forum.

Then no need to worry about root.
You just load it and it works.
http://www.murga-linux.com/puppy/viewtopic.php?t=86481
I use Google Search on Puppy Forum
not an ideal solution though

trueriver
Posts: 30
Joined: Thu 07 Feb 2013, 15:29
Location: Manchester, England

Solved

#5 Post by trueriver »

hi everyone,

Thanks for those tips.

On chromium v 25.0.1364.160 the file to edit is called /usr/bin/chromium-browser and the line to edit looks like this

Code: Select all

 exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS  "$@"
This is near the end of the file, the line just before the last "else" line.

Having found the correct line I edited it to look like this

Code: Select all

exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS  --user-data-dir "$@"
and as soon as I saved, and clicked on chromium in the menu, it worked :)

In particular, note that you do not need to give a file name unless you want to move the default file.

ssreddy
Posts: 41
Joined: Wed 12 Jun 2013, 16:39
Location: Hyderabad, India

#6 Post by ssreddy »

Alternately,

Edit the file /etc/chromium-browser/default using a text editor like geany.

Change the line CHROMIUM_FLAGS="" to CHROMIUM_FLAGS="--user-data-dir" and save the file.

Now chromium-browser will launch as root.

This I found on google & successfully applied.

I wonder why this can't be incorporated as default when Chromium is provided in the packages meant for use in Precise Puppy which runs only as root.

In Slacko puppy, Chromium runs out of the box. No need to apply any changes.

scientist
Posts: 860
Joined: Sat 23 May 2015, 08:21

#7 Post by scientist »

Flash wrote:I think there is at least one other thread in this forum where the question was asked and answered. Possibly in the How-To section.

Using the forum Search I found this and this.
thanks flash.

Chrome will now run. :-)
Thanks,
Andy


Slacko 6.3.0 FULL INSTALL
JWM
File Manager - Thunar

Post Reply