Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Sep 2014, 05:59
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Google Chrome as Root - The Revenge
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Author Message
DanYHKim


Joined: 14 Sep 2008
Posts: 103

PostPosted: Thu 14 Mar 2013, 12:00    Post subject: This is great! Works really well
Subject description: Created a script and .desktop to launch it
 

I am running Lucid 5.2.8 on a Motion M1300 tablet. My wife wanted to be able to read Kindle books using their Cloud Reader in Chrome, but I couldn't make it work with a new Chrome install. It was driving me nuts.

(Needed a new install because the .pet for Chrome does not support offline reading)

Installed Chrome 25.0.1364172 (google-chrome-stable_current_i386.deb)
Installed puppy-gc-001.pet

Made relative symlink from /opt/google/chrome of "product_logo_48.png" to /usr/share/pixmaps

Made a script to put in /usr/bin called "chrome_noroot" that has:

Code:
#!/bin/sh
LD_PRELOAD="/usr/lib/libpuppygc.so" google-chrome


Made a .desktop file in /usr/share/applications called google-chrome.desktop that invokes the script in its "Exec=" line, and also assigned the product_logo_48.png file as its icon.

Also dragged this .desktop to the Desktop and assigned it the same icon.

Now, I can launch Chrome from the menu or from the desktop icon, and it will run the preload, then chrome. It takes a little time to load up, but afterwards is appears to run without problems.

Thank you so much for this contribution. I was at the end of my rope.
Back to top
View user's profile Send private message 
psfal

Joined: 24 Jul 2013
Posts: 7

PostPosted: Sat 27 Jul 2013, 00:34    Post subject:  

Command not found
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 3895
Location: World_Hub

PostPosted: Sat 27 Jul 2013, 07:40    Post subject:  

Psfal- I thought you said you'd try Fatdog?
Code:
google-chrome --user-data-dir "$@"
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Mon 29 Jul 2013, 06:24    Post subject:  

Neat. This could do with a wiki page listing offending applications that it works with (and any super offensive ones that it doesn't, if there are any) Smile
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Mon 29 Jul 2013, 06:47    Post subject:  

Quote:
I was able to get rid of the warning message in the vanilla ROX-Filer this way, too. I just had to override getgid instead of geteuid.

It looks (i.e. I tested that the programs start, but did not test all the features) like if you just override getuid() then you can use this to start bibledit as root, and to remove the warning message in the stock xsane.

I tried creating a single lib that overrides all three functions, and in the process demonstrated that there can be adverse effects: if geteuid is overridden then bibledit-gtk freezes on startup.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
psfal

Joined: 24 Jul 2013
Posts: 7

PostPosted: Mon 29 Jul 2013, 19:18    Post subject:  

I tried, some of the code must be missing, I'm not a nuts & bolts guy, so if something else is needed to run those commands, I don't know what it is
Back to top
View user's profile Send private message 
psfal

Joined: 24 Jul 2013
Posts: 7

PostPosted: Mon 29 Jul 2013, 19:21    Post subject:  

@Semme, I am trying Fatdog, it's being vague, and actually minus the chromium "run as root" issue, Puppy is more cooperative with much more available software...
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Mon 29 Jul 2013, 21:28    Post subject:  

Iguleder wrote:
I was able to get rid of the warning message in the vanilla ROX-Filer this way, too. I just had to override getgid instead of geteuid.

Weird - here I need to override geteuid for Rox. Perhaps it was Chrome that needed getgid?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2545
Location: New Zealand

PostPosted: Mon 29 Jul 2013, 22:32    Post subject:  

Iguleder wrote:
I think we could use it for stubborn applications that don't like being executed as root.

This could be sort of a de-sudo Laughing

Or maybe a "sudon't" ...
Razz
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Thu 01 Aug 2013, 02:05    Post subject:  

disciple wrote:
Iguleder wrote:
I was able to get rid of the warning message in the vanilla ROX-Filer this way, too. I just had to override getgid instead of geteuid.

Weird - here I need to override geteuid for Rox.

Note that there are adverse effects with rox - it means when you open a terminal from rox it doesn't have root permissions.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6435
Location: Auckland, New Zealand

PostPosted: Wed 06 Nov 2013, 21:41    Post subject:  

FWIW I can also get rid of an offensive running as root warning in mousepad by overriding geteuid. But it causes this error message, although I don't know what actual adverse effects there are:
Code:
Mousepad-Message: Failed to connect to the D-BUS session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: Sat 09 Nov 2013, 16:08    Post subject:  

I had done something similar but figured out that if you are careful and replace N characters with N characters (otherwise you mess up the GOT), you can use sed to change the binary itself ...
Code:
sed -i "s/getuid/getpid/g" bin_or_lib_file
sed -i "s/geteuid/getppid/g" bin_or_lib_file
... but this may be against EULA
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Direxion


Joined: 24 Jan 2012
Posts: 2
Location: North Texas

PostPosted: Thu 14 Nov 2013, 15:43    Post subject: Thanks
Subject description: It worked
 

Thanks! I also got the "can't run as root" message after installing Chrome (Version 31.0.1650.4Cool and the puppy-gc-001 pet worked. However I did have to modify /usr/bin/puppy-chrome line 3 to "google chrome-stable" to match the package. So far Chrome seems to be running fine however after launching I did get this:

http://i783.photobucket.com/albums/yy112/ldctbf/capture1053.png

which apparently means that Chrome will not be able to update. I probably won't use it then for very long but it was a fun exercise.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0760s ][ Queries: 13 (0.0049s) ][ GZIP on ]