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 18 Nov 2017, 18:08
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
Start NetFlix direct from the Menu....
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Mike Walsh


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

PostPosted: Thu 09 Nov 2017, 21:52    Post subject:  Start NetFlix direct from the Menu....
Subject description: Launch NetFlix as a Chrome 'app'.....without opening Chrome itself!
 

Evening, all.

I've been having a play around the last day or two, and come up with a solution to something I've wanted to do for a while:-

To be able to launch NetFlix direct from the Menu.....without having to launch Chrome itself. This does, of course, specifically apply to those of you running Chrome, or one of the Chromium 'clones'. I haven't investigated how you could do this for FireFox (which can now run NetFlix), as I don't use it.

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

This is in large part only possible due to Chrome's ability to turn the contents of a given tab into an 'App'.....which can then be started from the App Launcher. This is the icon of little coloured squares, with the title 'Apps', situated at the far left-hand end of your Bookmarks bar (common to all versions of Chrome; it's where you find the shortcut for the Web Store, for instance). You will, however, need to be running at least Chrome 37 or newer, as the Widevine modules (which make NetFlix possible), were first introduced with the release of 37.

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

This takes the form of two sections. Firstly, enabling NetFlix as an 'App'.....which will allow it to launch in its own separate window. And secondly, using the 'app-id' unique to your NetFlix launcher (which I believe will vary from one individual's default profile to another) to create your Menu .desktop entry itself.

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

Section 1:- Creating the NetFlix 'app'.

a) First of all, open NetFlix in Chrome.

b) Go into the Chrome Menu (the 'hamburger' symbol, top-right), then More tools->Add to desktop... You'll get a small window come up as below. (I apologise for the crap quality of this, but I had to use SimpleScreenRecorder to capture, followed by taking a screenshot of the 'paused' video, then editing it.....you really don't want to know!) Rolling Eyes Laughing



Tick the 'Open as window' check-box, then click 'Add'.

c) If you now click on 'Apps' at the far left of the Bookmarks Bar, you should see NetFlix listed as an app.

d) Place your cursor over the app, and rt-clk. You'll get the option to 'Create Shortcuts'. Click this, and you get two further options; 'Desktop', and 'Applications Menu'. For our purposes, just tick the 'Desktop' check-box.

e) Go into ROX's /root window, and open the 'Desktop' directory. You should find a .desktop entry, titled Chrome-[long string of letters]-Default.desktop. This does not, however, work by itself. It needs turning into a 'Puppyfied' .desktop entry, which will work.

That's the first part 'done & dusted'. You can launch NetFlix in a separate window at this point, if you want to try it out; it'll open a separate window on top of the browser itself. You can then send this window to another desktop.

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

Section 2:- Creating the Menu entry.

a) Now; here, I've done most of the work for you. D'l and install the attached 'NetFlix-MenuEntry.pet'. This will give you the Menu entry for launching NetFlix. You will, however, need to check one thing, since, as stated above, this probably varies from one user profile to another; I'm certain the string of letters that identifies NetFlix in my Google a/c will be different to the same string of letters in yours.

b) Go into/root/my-applications/bin, and open the Netflix entry with Geany. Compare the string of letters in the app_id 'switch' (--app-id=xxxxxxxxxxxxxxxxx, etc) with the string of letters in your own .desktop entry in /root/Desktop.....which you created earlier (see above). If they're different, replace the existing string of letters with your own 'string'. Then 'Save', and exit Geany.

c) The moment of truth! Menu->Internet->NetFlix. All things being equal, NetFlix will now launch all by itself, in its own window, without Chrome even being open.....or, you can do this on another desktop. This window can, of course, be re-sized, if you don't want it full screen. Like this:-



Hope that's of some interest to some of you.....


Mike. Wink
NetFlix-MenuEntry.pet
Description  Launch NetFlix without having Chrome open...
pet

 Download 
Filename  NetFlix-MenuEntry.pet 
Filesize  19.23 KB 
Downloaded  14 Time(s) 

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


Last edited by Mike Walsh on Sat 11 Nov 2017, 10:54; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
mikeslr


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

PostPosted: Thu 09 Nov 2017, 22:32    Post subject: Almost like Peppermint Linux's ICE  

Hi Mike,

Whether or not you know it, you're exploration has come close to providing for Puppies what heretofore distinguished Peppermint Linux from other Linux distros. It calls it ICE. But essentially, its the ability to open any Website in its own window. https://peppermintos.com/2010/07/peppermint-ice-faster-lighter-aiming-for-the-clouds/.

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

Joined: 18 Jul 2012
Posts: 934

PostPosted: Fri 10 Nov 2017, 01:39    Post subject:  

Interesting.

Just an observation, but the app will also now appear in chrome://apps/ and you can right click and set a few things and make more shortcuts for either desktop or menu. Desktop ones end up in ~/Desktop and menu ones end up in ~/.local/share/applications.
Back to top
View user's profile Send private message 
Mike Walsh


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

PostPosted: Fri 10 Nov 2017, 07:14    Post subject:  

Morning, Mike!

Mm. Thanks for the info on Peppermint ICE. I really had no idea I was following in someone else's 'footsteps' with this; the idea came to me last night when I came across an article on MakeUseOf.com on creating Chrome 'Apps'.

Inspiration came from several different sources, really. Initially, it came from ETP's 'ChromeBook Pup' (the original version 1), which has always been one of my favourites, ever since I came across it a couple of years ago, d'l'd it, and tried it out.

One of the things ETP did was to place a launcher in the tray whereby you could access the Chrome 'Apps' page directly.....without firing up Chrome itself. And this got me thinking. I know there's always been an absolute bucket-load of command-line 'switches' that you can use in Chrome's launcher 'wrapper-script', to enable various functions within the browser when you start it (the --silent-launch feature being just one of many hundreds available). I had a look at the .desktop entry for this.....and a plan began to hatch.

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

Following the instructions in the MakeUseOf article, I created the NetFlix 'app'. I then did some more research (can't remember exactly where I found the details), and discovered that each and every one of these 'apps' that Chrome creates has a unique ID.....typically a string of about 20 random letters. Following further research, I then found out how to access this 'app_id' string; quite simply, you right-click the app on the Apps page, and you get the option to create shortcuts, for 'Desktop' and 'Applications'. Puppy doesn't utilise the Applications Menu that is quite common to many mainstream distros, but I knew there was a 'Desktop' folder in /root; many Windows apps installed under WINE will place a .desktop entry there. So, I ticked the 'Desktop' box to create a desktop shortcut, then had a look in /root/Desktop.....and there it was.

(A word of warning is in order here. If you want the NetFlix 'App' to fire up at the Login or Home pages, make sure you create the 'App' launcher while that page is showing. I made the initial mistake of creating the 'App' while in the middle of watching StarTrek 'Voyager'.....and the MenuEntry always started NetFlix at that same point. Deleting, then re-creating the NetFlix app while on the login page, then substituting the 'id-string' in the /root/my-applications/bin entry fixed that.....as it appears that each and every web-page will generate a different 'id_string'.

You have been warned! Laughing )


However, clicking on this generated .desktop entry directly didn't do anything, as far as I could see. Running it in the terminal, it was giving the usual moans about not having the SUID sandbox configured correctly, plus one or two other things, and..... 'I'm aborting now'.

I've got you to thank for the way in which I create my personalised .desktop entries! Remember that PhotoScape Menu entry you gave me the details for over 18 months ago? It forms the basis of every .desktop I've created ever since; I've used it as the template for all the Menu entries I've put together for the multitude of Wine apps and 'Portables' that I run.

So.....

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

I created a new entry in /root/my-applications/bin for NetFlix, which involved a modified exec-line from the wrapper-script we use for starting Chrome here in Puppy (obtained through trial & error)......and, crucially, included the 'magic incantation' for starting an App via its 'id_string'. I got the format for doing this from here:-

https://askubuntu.com/questions/741591/launch-a-chrome-app-from-command-line?noredirect=1&lq=1

The .desktop entry in /usr/share/applications was pointed at this, and a suitable PNG icon was obtained via a search on DuckDuckGo.

Using Trio's brilliant PetMaker (which I use to create all my .pets these days), I put together & created the NetFlix MenuEntry .pet, then installed it. I'd already successfully launched the NetFlix app by using the wrapper command from the terminal, so I knew it would work. And.....it was time for the moment of truth. Went into Menu->Internet, and clicked on the 'NetFlix' entry, and.....

Bingo!

Since NetFlix and MediaFire (where I store all my Puppy packages) are two of my most commonly visited sites, I've created an App & MenuEntry for MediaFire, too. Because it's still Chrome behind the scenes, LastPass works for my login details.....and since I run one common instance of 32-bit Chrome 48 remotely (and sym-linked into all Pups), they all share the same 'Default Profile'. So all I need to do is install the MenuEntry into each Pup, and it fires up, good as gold.

Neat..!


Mike. Wink

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


Last edited by Mike Walsh on Fri 10 Nov 2017, 08:08; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
belham2

Joined: 15 Aug 2016
Posts: 1297

PostPosted: Fri 10 Nov 2017, 07:23    Post subject:  

This is nice Wink , but since I never use Chrome for anything in the Net-world except Netflix, I never went the way of Peppermint's ICE (Peppermint is a distro I first used 2 years ago & still sometimes use & have set up other sets of things in my pups based on their ICE idea).

Anyhow, my Google Chrome just sits in the tray, beside the other browser (i.e. Palemoon or FF) that is my heavy lifter, and when the 'flixing urge hits, I just punch Chrome and immediately I am logged into Netflix & my account, and am ready to degrade my mental faculties even more. Big thing is no logging in, which is great. And with Chrome's ability to open in theatre-mode, it is overall actually way nicer than doing all of this in Firefox's new capability with Netflix. For FF and Netflix, imho, it is still not up to Chrome's level, as it has lesser video and playback qualities, and less choices for doing things with the video itself than Chrome does.
Back to top
View user's profile Send private message 
Mike Walsh


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

PostPosted: Fri 10 Nov 2017, 07:49    Post subject:  

belham2 wrote:
This is nice Wink , but since I never use Chrome for anything in the Net-world except Netflix, I never went the way of Peppermint's ICE (Peppermint is a distro I first used 2 years ago & still sometimes use & have set up other sets of things in my pups based on their ICE idea).

...<snip>...

Big thing is no logging in, which is great.


I agree with the last bit above. I've just edited the previous post to add the info about the 'id_string' being different for every web page.....so you can create your NetFlix App at the point where you have logged-in already.

And because you now have a Menu entry, you can go one step further.....and add the NetFlix 'launcher' to the tray itself. Which is what I've just done; single-click on the NetFlix tray launcher.....and veg-out to your heart's content. So in your case, if you only use Chrome for NetFlix, replace the Chrome launcher with the NetFlix launcher.....

Just an idea..!

(I'm pretty certain that this should also work for the Chromium-based 'clones'. After all, they all use the exact same 'engine' under the hood.....)


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: 1297

PostPosted: Fri 10 Nov 2017, 07:58    Post subject:  

Mike Walsh wrote:
So in your case, if you only use Chrome for NetFlix, replace the Chrome launcher with the NetFlix launcher.....

Just an idea..!


Mike. Wink



Lol, Mike!

I subscribe to that old school of 'don't fix something that isn't broke' and my long ago Father's version "never fix something that ain't broke if there's no change (he meant upgrade) to it". Wink


P.S. You should let your imagination run wild with these launcher ideas. I do all sorts of stuff in pups with just one punch of the button, stuff that usually takes 2 or 3 clicks.. Cool
Back to top
View user's profile Send private message 
Mike Walsh


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

PostPosted: Fri 10 Nov 2017, 08:03    Post subject:  

belham2 wrote:
P.S. You should let your imagination run wild with these launcher ideas. I do all sorts of stuff in pups with just one punch of the button, stuff that usually takes 2 or 3 clicks...


Snap!

As I always say; I believe in providing choice for Puppians.

I rest my case..... 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 
jake29

Joined: 24 Jul 2015
Posts: 103

PostPosted: Fri 10 Nov 2017, 09:41    Post subject:  

Interesting stuff, Mike.

I've used your instructions to create Menu entries for Spotify and Amazon Video. However, in Fatdog 64; Section 1 (d) and (e) did not apply - no .desktop shortcut was created.

Instead, I was able to identify the 'App ID' by doing the following:
Quote:

(1) On Chrome 'Apps' screen (chrome://apps/) - Enable Developer tools via <three dots> More tools.

(2) Using the 'Select an Element' tool (Ctrl+Shift+C) - Select the App you want to ID.

App ID is then revealed (in bold): src="chrome://extension-icon/ljajiaaklnemnpsanficinjfefmocelo/128/1">

Thanks for the thread.
Back to top
View user's profile Send private message 
Mike Walsh


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

PostPosted: Fri 10 Nov 2017, 10:05    Post subject:  

Hiya, Jake. Glad you found it useful.

I didn't expect it would be exactly the same set of steps for everybody, given the huge diversity of Pups there are out there.....and the different distros they're based on.

Of course, as with so much stuff in Linux, there's multiple ways of arriving at the same outcome. Which is one of its strengths, IMO. And the beauty of this is that's simply making use of existing tools already in Chrome.

With a little bit of inspiration, of course...!! Laughing

Have fun. Remember; you can, of course, turn any web-site into an 'app'.....and then launch it by the method out-lined above.


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 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 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.0582s ][ Queries: 12 (0.0050s) ][ GZIP on ]