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 Wed 22 Nov 2017, 05:28
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
Running latest Chrome as both Spot and Sandboxed
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Wed 01 Nov 2017, 06:52    Post subject:  Running latest Chrome as both Spot and Sandboxed  

This is a post for those who like to set up their own blink browsers where you run both as 'Spot" and also with 'Sandboxing'. I've been doing this for some time in my Chrome64 'frugal' installs on any Tahr/Xenial/Zesty/Artful-based 64-bit pups. It's actually not hard. It's just fooling Chrome with a script and also the fact that you are going to place everything---and this means everything (save for the .desktop file and icon, if you prefer)---inside your /root/Spot directory. Plus you are utilizing both /root/spot/.cache and /root/spot/.config there (this is important!). There is nothing related to google-chrome, Google, or Chrome, or anything relating to them, in /usr/bin and/or anywhere else in your system. These pics below will be self-explanatory and let you do it. I've tested this repeatedly over the past year, and both "Spot" and "Sandboxing" (see pics) works if you set everything up this way. Plus, as mentioned, you're using a script in /root/spot/ to launch Chrome that is also "inside" /root/spot, so Chrome believes or acts as if you are a "user" and not "root". I haven't tested it, but I am fairly sure this would work for any blink-based browser. Right now, I am running the latest Chrome64 (62.0.3202.75) this way---and I can easily update it by just downloading from Google the latest Chrome and only dropping in what's needed but leaving the original, modified 'google-chrome' in the chrome folder and everything else (in both /root/spot/.cache and in /root/spot/.config) in place. (Any questions, let me know.)



Here's the pics:
Screenshot(1).png
 Description   
 Filesize   224.57 KB
 Viewed   367 Time(s)

Screenshot(1).png

Screenshot(2).jpg
 Description   
 Filesize   185.67 KB
 Viewed   369 Time(s)

Screenshot(2).jpg

Screenshot(3).png
 Description   
 Filesize   142.39 KB
 Viewed   368 Time(s)

Screenshot(3).png

Screenshot(4).png
 Description   
 Filesize   133.17 KB
 Viewed   367 Time(s)

Screenshot(4).png

Screenshot(5).png
 Description   
 Filesize   129.75 KB
 Viewed   367 Time(s)

Screenshot(5).png

Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2012
Location: 500 seconds from Sol

PostPosted: Wed 01 Nov 2017, 09:34    Post subject: Request for Scripts  

Hi belham2,

Nice work. Smile And explained sufficiently well that I think I understand even before I've finished drinking the day's first cup of coffee. Laughing

Could you do me, and perhaps scores of others, a favor. Copying the scripts you've used from screenshots is likely to result in lots of scrivener's errors. Could you add one of the allowed extensions to chrome.sh and google-chrome and post them?

I've love to see, if edited, they'd work with Iron. Will post results.

Thanks,

mikesLr
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Wed 01 Nov 2017, 10:08    Post subject:  

Hi, belham2.

I take my hat off to you, young man. It works a treat..!

This is what I've been head-scratching over for the better part of the last 3 or 4 weeks. I've still got it running from a remote data partition, but the principle's sound. Credit where credit's due. Thank you.

I was thinking somewhere along the same lines as this, but using a named user directory instead.....using the existing /home directory in '/'. But Puppy will only allow you to change to one of three 'owners'; 'root', 'spot'.....and 'fido'.

Code:
chown -R Mike:Mike /home/Mike


.....was not recognised.

So, 'spot' it is! Smile

-----------------------------------------------------------------------------

Like I said, Tahr 64 is the only 64-bit Pup I'm currently running. I've added the 'lib' folder and 'preloading' you asked me about, for two reasons:-

a) I installed the upgraded libnss3.so quite a while ago. But for some weird reason, Chrome simply doesn't 'see' it. By doing things the way battleshooter and I did it, Chrome does see the required 'upgrades'.

b) The other reason is that, doing it this way, existing apps which are written to expect older versions of the libs in question don't get their knickers in a twist.....and continue to work happily.

This, as I've stated recently elsewhere, is one of the very few down-sides to the way Puppy works. No 'on-going' updates. In the normal course of things, on most 'mainstream' distros, by the time Google released Chrome 62, everybody's else's systems would have been in a fit state to run it.....not only upgraded libs, etc., but also all upgraded apps to work with the newer dependencies.

For us here in Puppyland, we have to cross these bridges as we reach them..! And as I've also said before, the true mark of a community that pulls together is one that freely shares ideas, fixes, workarounds, etc.....so long as credit is given where it's deserved, I for one have no problem with any one else in the community making use of something I may have figured out.

The type of community we don't need is one with a bunch of primadonnas who continuously need their egos stroking all the time, in constant need of praise......and who jealously guard their 'fixes & workarounds' like it was closed-source code. That ain't the Linux way.....and it sure as hell ain't the 'Puppy way'!! Shocked Rolling Eyes Laughing

-----------------------------------------------------------------------

@mikesLr:-

If belham2's OK with it, I'm going to knock up a reworked package for Chrome, employing his method & script modifications, sometime in the next couple of days. Since SlimJet and Iron are both based on the exact same source-code as is Chrome itself, I see no reason why this new method shouldn't work for them, too. As & when the next releases come out, I'll transition across to the new layout.

I didn't realise you were an Iron fan, mate. Keep an eye on the Iron64 thread over the next few days; I'll get around to it sooner or later..!

Posting this from a fully-sandboxed Chrome 62 as a 'normal user' right now. Very Happy


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Wed 01 Nov 2017, 14:39    Post subject:  

@mikeslr----will do, will try to get 'em posted tomorrow. Right now, that laptop and USB External HD that Tahrpup64 sits on is in the middle of a kernel compiling that is probably going to take all night, judging from how slow it is going, lol Very Happy


@mikewalsh---there's no "me' in this. This whole thing was because of you and Oscar, and I completely brain-farted this whole time thinking you both had Chrome already doing this. I only stumbled on it out of frustration a long time ago, and it wouldn't have been possible to do it without the building blocks from you two (Oscar for giving me hints about outwitting it with a script, and then studiously studying all your SFSes). So, the 'thank yous' should be directed at you both, not me. Without Oscar's hint and especially without your chrome (all blinkies) work over all this time, trying different things to make Chrome/Slimjet/etc start, I couldn't even have begun to out-think them suspender-wearers at Google. It was just luck, haha Wink Hope they don't once again stop us from having this little trick too. Chrome is a dam#-sight easier and nicer to run when Netflix-ing than all the other blinkies I've tried.
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1492
Location: Italy

PostPosted: Thu 02 Nov 2017, 12:31    Post subject:  

This way to run latest google-chrome works in slacko64 700 beta. My chrome.sh:

Code:
# cat /root/spot/chrome.sh
#!/bin/sh
SPOT_HOME=$(awk -F: '$1=="spot" {print $6}' /etc/passwd)
cd $SPOT_HOME/Downloads
LD_LIBRARY_PATH=/mnt/sda1/palemoon_64:$LD_LIBRARY_PATH
exec ~/google/chrome/google-chrome --user-data-dir="$SPOT_HOME/.config/chrome" "$@"


I have palemoon64 27.5.1 in /mnt/sda1/palemoon_64. Change it if needed by your preferences. To launch chrome:

Code:
chown -R spot /root/spot
cd /root/spot
su spot
sh chrome.sh
pic.png
 Description   
 Filesize   53.54 KB
 Viewed   258 Time(s)

pic.png


Last edited by watchdog on Thu 02 Nov 2017, 13:05; edited 1 time in total
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Thu 02 Nov 2017, 12:52    Post subject: Re: Request for Scripts  

mikeslr wrote:
Hi belham2,

Nice work. Smile And explained sufficiently well that I think I understand even before I've finished drinking the day's first cup of coffee. Laughing

Could you do me, and perhaps scores of others, a favor. Copying the scripts you've used from screenshots is likely to result in lots of scrivener's errors. Could you add one of the allowed extensions to chrome.sh and google-chrome and post them?

I've love to see, if edited, they'd work with Iron. Will post results.

Thanks,

mikesLr



Hi MikesLr,

Sorry I got to this so late, honestly forgot till now Embarassed . Just remove the ".gz" from them both, and you'll be good to go. I honestly think MikeWalsh, in his new SFS of Chrome put up in his thread, and Watchdog's just now posted above msg, have cleaner, neater approaches. Mine is/was sort of clunky, much akin to a sledgehammer-in-frustration approach. Wink
google-chrome.gz
Description 
gz

 Download 
Filename  google-chrome.gz 
Filesize  2.21 KB 
Downloaded  26 Time(s) 
chrome.sh.gz
Description 
gz

 Download 
Filename  chrome.sh.gz 
Filesize  269 Bytes 
Downloaded  20 Time(s) 
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Thu 02 Nov 2017, 13:46    Post subject:  

Hi, belham2.

belham2 wrote:
I honestly think MikeWalsh, in his new SFS of Chrome put up in his thread, and Watchdog's just now posted above msg, have cleaner, neater approaches. Mine is/was sort of clunky, much akin to a sledgehammer-in-frustration approach. Wink


Thanks for the kind words.....but I think in all honesty (as with so much here in Puppyland) that it's very much a 'team' effort, assembled from help, suggestions and ideas from multiple sources. For instance, the wrapper-script I'm now using has input from Oscar, battleshooter, and now yourself; my personal input is very minimal.....but it works, that's the main thing - to the benefit of the entire community (hopefully).

(I don't care; I'm no primadonna, and if input from several different sources helps to improve the experience for everyone, I'm cool with that.) Very Happy

This is why I repeat here what I've said on many occasions; I've had so much help & encouragement from Puppians here on the Forum (too many to even begin to name them all!), that to me it's only natural to want to try and return that favour. I've discovered, during the last 18 months, that I enjoy assembling packages (of whatever sort); I still don't think I make a very good job of them, but.....I'm learning all the time, and (hopefully) improving as time goes by.

-----------------------------------------------------------------------------------

mikesLr wrote:
Could you do me, and perhaps scores of others, a favor. Copying the scripts you've used from screenshots is likely to result in lots of scrivener's errors. Could you add one of the allowed extensions to chrome.sh and google-chrome and post them?


I know just where you're coming from, mate; it took me the best part of two hours to transcribe them into Geany, switching back & forth from one desktop to another.....followed by triple-checking to make certain I'd dotted all the 'i's and crossed all the 't's (and got all the spaces and tabs in the right places).....!!! Laughing Wink

(I'm still waiting for Iron 62 to be released, but I'm expecting it any day now. Won't have too long to wait to try those scripts out.....)


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Thu 02 Nov 2017, 18:59    Post subject:  

watchdog wrote:


Code:
chown -R spot /root/spot
cd /root/spot
su spot
sh chrome.sh



Hi Watchdog & everybody,

Well, I can confirm your way of getting the latest chrome to run in Micko's latest Slacko 700 (6.9.9.9) works good. And it is honestly the only way I have seen to run Chrome there.

The absolute latest Chrome I can get to run in Micko's Slacko 700 is Version 58.0.3029.110 . After that, they all refuse to start in Slacko700 no matter what I do and/or try.

A question then: is there any way possible to put into one script those four terminal commands Watchdog wrote? I realize some serious stuff is going on there, as in changing ownership of Spot, then going inside Spot and becoming the controller of it, and finally launching a script. But, boy, if you want to run Chrome a lot to watch Netflix or whatever, having to enter those command every time is a major pain in the butt.

Any ideas on how we can get them down to one launcher that we can click on and have it work??
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Thu 02 Nov 2017, 20:21    Post subject:  

Hi, belham2.

belham2 wrote:
A question then: is there any way possible to put into one script those four terminal commands Watchdog wrote? I realize some serious stuff is going on there, as in changing ownership of Spot, then going inside Spot and becoming the controller of it, and finally launching a script. But, boy, if you want to run Chrome a lot to watch Netflix or whatever, having to enter those command every time is a major pain in the butt.


Mm.

(*thinks...*)

I would imagine the easiest way would be to simply add them into your own 'chrome.sh' script, which sets the required parameters, then launches the 'google-chrome' wrapper script?

(I can't test this out I'm afraid, 'cos I just cannot get the newest 64-bit Slackos to behave themselves on this box at all...)

Just not quite sure how you'd re-write it.....although from the sound of things, you'd only need to do this for Slacko, yes? You say you enter those into the terminal, then you can launch Chrome in the normal way? Is that using your own method, as outlined in this thread?

Perhaps watchdog would have a better idea of the best way to implement this. I know the lad's very modest about his abilities, but he's already a better coder than I shall ever be..! Embarassed Rolling Eyes Laughing

I mean, it's easy enough to put those commands into a single script:-

Code:
#!/bin/sh
chown -R spot /root/spot
cd /root/spot
su spot
sh chrome.sh


....give it a name, save it (probably to /usr/local/bin), make it executable (chmod 755, or right-clk and tick the 'Exec' boxes), after which you could drag it to the desktop, tart it up with an icon (if you wanted), then click on it to run it before launching Chrome.

One way round it, I guess. I'm not sure as incorporating that into your existing 'chrome.sh' script wouldn't interfere with what you'd already put in there.....

As I said, I'm no expert. Just throwing out ideas, here. For sure, it's not as 'elegant' as having it fully incorporated into the existing scripts....but it'd work.

(Posting this from the 'beta' of Chrome 63, BTW.....*yuk, yuk, yuk*) All thanks to the fresh 'breath of life' your scripts have given Chrome in Puppy.

You li'l beauty! Laughing Very Happy Very Happy


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Fri 03 Nov 2017, 12:21    Post subject:  

Mike Walsh wrote:


(*thinks...*)

I would imagine the easiest way would be.....

.... to put those commands into a single script:-

Code:
#!/bin/sh
chown -R spot /root/spot
cd /root/spot
su spot
sh chrome.sh


....give it a name, save it (probably to /usr/local/bin), make it executable (chmod 755, or right-clk and tick the 'Exec' boxes), after which you could drag it to the desktop, tart it up with an icon (if you wanted), then click on it to run it before launching Chrome.




Haha, Mike, remind when we're drowning ourselves in our second pint of Guinness to not let you (or me) near the coding machine. Wink Those four commands Watchdog gave, I think there's serious stuff going on there. When you "chown" (change ownership) of a directory, flip into that directory and then tell it you are the "root" of its Spot commands, and finally launch a script of a program residing in that directory as that rooted "Spot" owner....well, it takes a bit more than just writing those 4 lines down and putting the #!/bin/sh-cherry on top of it. Laughing I think I have to structure consecutive "exec" commands, but I am not getting it right Crying or Very sad . I'm going to ask Mochi (and all) in "programming" and see what they think. It's probably super simple for them, but like I said, for me too even simple coding is hard for this old brain to grasp. Mochi and them speak in alien tongues there, but I'll try to decipher and post back here. If I can get Slacko covered, we'll have all of the bases of pups covered for your SFSes! Very Happy
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1304

PostPosted: Fri 03 Nov 2017, 13:30    Post subject:  

Hiya MikeW & all,

I posted in "Programming", and puppyluvr, Fred & Amigo responded. Decided to use Fred's 2nd example, and Chrome fires right up. Now we can incorporate that little script into our Slacko64-based pups and the latest (downloaded straight from Chrome, or using Mike's great SFSes0 to fire Chrome up as both "Spot" and "Sandboxed". Here's the thread:

http://www.murga-linux.com/puppy/viewtopic.php?p=973179#973179

And here is Fred's script that I am using right now & watching Chrome gloriously fire up Wink

Code:

#!/bin/sh
chown -R spot /root/spot
cd /root/spot
xhost +local:spot
su spot -c ./chrome.sh



P.S. Mike, maybe you could incorporate this into your Slacko64-SFSes from now. We could even do a simple .desktop file with the neat Chrome icon you use. It makes starting up Chrome as spot & sandboxed a treat! Wink
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
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.0645s ][ Queries: 12 (0.0042s) ][ GZIP on ]