Posted: Sat 04 May 2013, 19:42 Post subject:
How I built a patched Wine for NetflixSubject description: Successful in Slacko 5.5 PAE

EDIT 20130505-1601 (PDT):
01micko has created a PET and an SFS of the patched Wine build for Slacko 5.4 and later down here.
I suggest reading through the complete thread for additional information.
-----------------------
HOWTO (or: Proof-of-Concept at the very least): Build a patched Wine for Netflix - successful in Slacko 5.5 PAE

Hello Puppy people,

Browsing your forums revealed that several folks have been looking for a Puppy version of Erich Hoover's "netflix-desktop" for Ubuntu, and after becoming curious, then obsessed, and suffering through several failed attempts, I've actually managed to get Netflix working in Slacko 5.5. However, I don't have an SFS or PET to distribute, and I'm not certain that it would be functional for everyone if I did. I consider myself a Linux novice (knowing just enough to be a danger to myself ), and I'm a total newbie to Puppy, so I figured a HowTo would be better than stumbling my way through an SFS or PET build I might not be able to troubleshoot when questions came up. Perhaps someone with more experience can take a look at what I've done and do a more solid job of it, or at least point out any mis-steps I may have taken.

Some important base info:
I built and am running the patched version of Wine on a Toshiba Portege M400 (2 GHz Core 2 Duo T7200 / 2 GB RAM / Intel 945GM integrated gfx), running a clean, full install of Slacko 5.5 PAE.

The full install may be the most important thing to note, because Silverlight requires XATTR (extended file attributes) to be enabled on any volumes where it saves or caches information (i.e., the .wine directory which will be created in your home folder, and possibly in /usr/bin/wine although I'm not sure about that). A full install -- in my case, to a single ext4 volume -- allowed me to add "user_xattr" to fstab to ensure it was enabled.

Without XATTR, Netflix throws "N8156-6022" errors when attempting to play video. I don't know enough about Puppy's file systems to tell you if setting this flag in fstab would work for a frugal install, or if you can set XATTR to be included in a targeted SFS build. Can anyone fill in these particular blanks?

On additional build prep, I installed devx_slacko_5.5.sfs using the "cp -a --remove-destination" method for a full Puppy install, and mpg123-1.14.4 by way of the Puppy Package Manager.
-----------------------
EDIT - 20130505-1517 (PDT):
I originally used a number of PETs gleaned from green_dome's Wine build thread, but was informed by 01micko that they could break Slacko 5.5 (see further down the thread). I've thus trimmed that info out of this post, but still want to thank green_dome for going the extra mile and including all of the info he does in his build announcements. I wouldn't have gotten as far as I did without them.
-----------------------

Build instructions:
Assuming you've...
1. Added "user_xattr" to /etc/fstab and rebooted your machine (for safety's sake - got nervous about running "mount / -o remount" with Puppy's unique filesystem, so I didn't),
2. Installed your devx.sfs and mpg123, and
3. Created a working folder such as "experiments" (used in the examples below) in your home folder, and have downloaded all 5 compholio patches plus wine-1.5.28.tar.bz2 to it
...do the following in your terminal:

...And this is where my newbie-ness really shows. While the missing or "too old" dev files, or the "prelink not found" warning don't appear to hamper completing the build or stop Wine from running, I wonder if I should have put more effort into filling in these gaps before continuing. Unfortunately, I've had problems finding the appropriate libs and tend to give up in frustration when when my Google-fu fails me. Any advice here would be greatly appreciated.

Regardless, you can continue on with your build.

Code:

make depend && make

If all went well, each process will complete without errors and you can install your freshly-built Wine.

Code:

make install

Once done, check your install using:

Code:

wine --version

It should return wine-1.5.28.

To get Netflix working:
You need to install the following:
1. The Windows version of Firefox 18.0.2
2. Microsoft's core fonts
3. Silverlight version 4.x

To kick things off, start with the Firefox download and installation. The install portion of the following should also trigger Wine's download/install of Mono & Gecko, which you should allow.

Code:

cd .. # to get you back into your working folder (i.e.,"experiments") instead of downloading to the "wine-1.5.28" folder
wget -O Firefox-18.0.2.exe http://download.mozilla.org/?product=firefox-18.0.2\&os=win\&lang=en-US; wine Firefox-18.0.2.exe /S

If you choose to launch Firefox at the end of the installation, you can kill a couple of important birds with sequential stones here.

The first -- which is very important for running Netflix successfully -- is to go into your Windows Firefox options and disable automatic updating. If you don't, FF will update itself in the background and eventually install version 20, which will force a "required" installation of Silverlight 5.x through Netflix' service, and SL 5.x will not work in Wine at all. So, go to Tools-> Options-> Advanced, click the "update" tab, select the "Never check for udpates" option, and uncheck "Use a background service to install updates."

Once that's done, you can get the Microsoft core fonts installed right here and now by going to http://www.microsoft.com/en-us/download/details.aspx?id=16083 and downloading their "European Union Expansion Font Update." If you go ahead and run the EXE from within Wine Firefox, working fonts will be installed for your next run of Wine. Hit "Save File" (may as well keep a copy handy if you need it again) and then "Open" in the Firefox download window to run the installer, hit "No" when it asks you to restart Windows, then close your Firefox to terminate your Wine session.

If you don't go with the EU font update, you can install Winetricks and get the MS core fonts that way. However, before grabbing Winetricks, you should search for and install cabextract through the Puppy Package Manager (if you don't have it installed already). Once done, do the following:

When the test starts, it should ask you to if you want to allow DRM-restricted playback, which you should agree to. Once "Elephant's Dream" starts playing, you can right-click on the video, select Silverlight, and set other options, including "Never check for updates" (to keep the dreaded 5.x version further at bay).

Now you can go to Netflix.com, log in, and trying playing the vid of your choice. The very first time you attempt playback, you may be faced with a black screen. Hitting F11 a couple of times to snap Firefox into kiosk mode and back, or resizing your Firefox window should get you picture. If you go into your Netflix settings and drop the video quality down, it should help to avoid this in future runs.

For troubleshooting reference, here's a couple of Netflix errors I ran into and what they mean:
Error Code: 1001 = You don't have MS core fonts installed
Error Code: N8156-6022 = XATTR isn't active on the volume Silverlight's trying to touch. I also got this when trying to build Wine from the 1.5.29 source after applying the Compholio patches.

NOW FOR A BIG OL' CAVEAT:
If you take a look at the picture I attached, you should notice that my cli window is flooded with these messages...

Code:

fixme:d3d:wine_d3d_swapchain_present Ignoring flags 0x80000000.

...and that my system load is ridiculously high during Netflix playback, so much so that I wasn't able to get usable screen grabs with PrntScn. I believe that both of these symptoms are the result of X11R7 omissions from my Wine build, but I haven't been able to figure out exactly what X11 libs I'm missing, or should otherwise be doing differently. Again, any help here would be greatly appreciated. It'd be awesome if this patched version of Wine could be used for more than just Netflix (and not murder my CPU cycles in the process), but as I mentioned previously, total newbie here.

Some of these packages have the potential to break Slacko! Especially:

xorg 7.3. Slacko already ships with xorg-7.6 and full mesa/dri packages so this should be omitted.

gnutls - already included

libgphoto - already included

libusb - that's a core package and is included in all puppies already

fontconfig - ditto, dependency of X.org

openldap-client - already included

You can get mpg123 from the PPM but the version green-dome links to should do no harm.

As for your configure argument, it's fine. The xorg which green-dome uses is put into /usr/X11r7, a legacy location which may be why xorg didn't break for you. The original Slacko xorg would still have been running and those libraries used to link to.

Now, with the xattr argument to mount the save file may well work for frugal installs, however this would require hacking of the initrd.gz. This isn't for the feint of heart but could possibly be scripted, hence automated.

I have no idea about the errors you are getting in console, but if they don't stop the program then why worry? They could possibly be silenced with a wrapper script.

I have never used NetFlix. Is this subscription based? Is it available outside of the US?

Again, great work, I'm sure this will inspire some interest.

Cheers._________________Puppy Linux Blog - contact me for accessLast edited by 01micko on Sun 05 May 2013, 19:09; edited 1 time in total

Hi 01micko! I have to say, I've become a fan of your and Mr. Kauler's work. It's been great to have valid, modern OS options for the old iron, and a super-efficient choice for the newer gear!

01micko wrote:

Now, some stuffs that you may consider editing...

Whoa... Thanks! Guess I got ahead of myself by digging too far back, eh? I'll try a fresh build without the bad PETs and see what's to be seen. Perhaps it'll help the performance a bit.

01micko wrote:

I have no idea about the errors you are getting in console, but if they don't stop the program then why worry? They could possibly be silenced with a wrapper script.

My major concern is that the errors are indicative of problem that's putting unnecessary load on the system during Silverlight video playback. My averages have been 1.95/2.03/1.98 while watching a 24 min. Netflix vid in Slacko, which is nowhere near the kind of loads I'm getting on my Ubuntu 10.10 rig (which has a better video system, but not by much - nVidia Quadro NV1000 som'n-or-other). Checking the net, I've discovered this same problem was reported by a Gentoo user (see here), who also noted they were getting a black screen when first launching playback as I described above. The Gentoo solution was to run "eselect opengl set xorg-x11", but that's a specific admin/config command for Gentoo... Anyone have any idea what a Puppy equivalent would be? Or would this be something that could be set up by way of the Wine config?

01micko wrote:

I have never used NetFlix. Is this subscription based? Is it available outside of the US?

Don't want to sound like a corporate shill, but Netflix is pretty awesome. It's a subscription streaming service for movies & TV shows (old & new) for ~$9.00 US/month, and it's available in US/CA/GB/IE, South America, Denmark, Norway, and a few other countries. It's also been counted by many Linux users as a main reason why they haven't completely dumped Windows.

Ted Dog wrote:

Do you think it will work like wine and slacko-1.sfs for fatdog64, I've seen this in two other linux distros. Glad someone got this to work with a version/spin of puppylinux.

I think that if Wine can be built to run in FatDog64, then a patched version of Wine for Silverlight should be possible, but don't quote me on that... I don't know nuthin' 'bout no 64-bit OSes and their multi-arch stuff.

Frugals (not USB installs) are mounted with user_xattr by default, no intervention needed.

I didn't try NetFlix, don't know if it's available here anyway, maybe, but silverlight works. (EDIT: yes NetFlix is available but there is a bit of stuffing around with routers and such for the "Unblock-us" service, not doing it here, I have a couple of servers running).

Maybe Larry (playdayz, lucid puppy developer) can now ditch Ubuntu!

I'll upload a wine package tomorrow, including cabextract and winetricks. This should be doable on Precise Puppy too.

wine-1.5.28 patched for silverlight use as instructed by mr_what above.

winetricks

zenity (for winetricks gui)

cabextract

prelink (130507)

Compiled and tested on a pristine frugal install of Slacko-5.5-4g, tested with devx removed so there are no surprises. Also tested on ThinSlacko-5.5.03 (k3.9). This should work on anything based on Slacko-5.4 onwards. Please follow mr_what's instructions except for compiling Wine. You can safely ignore the user_xattr instruction only if you use a frugal install. This is untested on a full, but using mr_what's hack in /etc/fstab should work fine.

Take particular notice that gecko and mono download and install correctly. Make sure you have at least 500M free (more is better) in your save file before hand.Remember, windows stuff = BLOAT

Take particular notice of disabling auto-updates in Windows Firefox. Use the winetricks corefonts command to get the fonts.

NOTE: it appears that USB installs don't support the user_xattr argument ootb, someone might want to test this and hack accordingly (please do! I haven't much time from now 'til end of June).

NO WARRANTY!

Not intended for Precise Puppy but that doesn't mean you can't test, I recommend the sfs for minimal damage. Better, someone using Precise might want to compile Wine with patches.

silverlight.jpg

Description

the default silverlight test page

Filesize

60.8 KB

Viewed

4379 Time(s)

_________________Puppy Linux Blog - contact me for accessLast edited by 01micko on Mon 06 May 2013, 19:01; edited 2 times in total

I might noodle around in Precise myself in the near future and see what's what, but I'm still obsessing over getting those wine_d3d_swapchain_present messages to stop spamming my cli, and see if anything related to tweaking opengl/xorg-x11 can improve performance. It should be noted that rebuilding Wine using nothing but the Slacko devx file and mpg123 has dropped my load averages into a fairly consistent 1.85 range, but I'm convinced there has to be some way to reduce the load even further._________________Proponent of better living through reckless experimentation.

I'm still obsessing over getting those wine_d3d_swapchain_present messages to stop spamming my cli, and see if anything related to tweaking opengl/xorg-x11 can improve performance

Me too. It might be as simple as an option in /etc/X11/xorg.conf, but what? Be nice to know what eselect opengl set xorg-x11 in gentoo actually does.

Also, I found a free site for testing, full screen works from the silverlight frame. It's a bit buggy to begin with but seems to settle down. BTW, I'm using nvidia GS8400 hardware, on top of an Athlon X2 @3GHz, tried both nouveau driver and the latest nvidia driver, similar results.

Before I forget...
Some Extra Info for Those Who -- Like Me -- Aren't Familiar with the Ways and Wiles of Wine ('cause we newbies need all the help we can get):
My continued noodling led me to use Winetricks to install the d3dx9 DLL set, which summarily borked Silverlight (see the attached screeny, and yes, this is what my screen caps look like when Wine's running Sliverlight content). Reinstalling Silverlight as recommended didn't solve the problem and Winetricks doesn't have an "uninstall" routine, but I was able to delete the .wine folder in /root/ (a.k.a. your home folder), then reinstall Firefox, the MS core fonts, and Silverlight again using the saved versions of the .exe's I had handy, and was back up and running in a couple of minutes. Since the core Wine installation was untouched (no need to re-download Gecko & Mono), getting back to normal was a snap.

I now see one reason why Erich Hoover chose to configure his netflix-desktop version of Wine in a compartmentalized way, and keep it separate from any core Wine installations on Ubuntu systems: It saves from potential headaches for folks who want to use Wine for more than just Silverlight-based content. On that note, it would absolutely suck if this patched Wine version was hamstrung to nothing but Firefox 18 w/Silverlight, even though the patches might have undesirable effects on other programs that folks want to run in Wine (YMMV should be assumed from the start).

I don't care much for the idea of reducing a powerful, multifaceted program like Wine down to a unitasker, so try this on for size: There is a quick-and-dirty (and very ugly) way to keep your Silverlight-enabled Firefox away from other programs you want to run in Wine, and vice-versa. When you want to install a game or MS Office or what have you, rename your .wine folder in /root/ to .wine.silverlight. Wine will create a new .wine folder which will house all of your other program files and their specific runtimes without munging up your Netflix-capable Firefox. When you're done with your other programs and want to watch some vids, rename that newer .wine folder to .wine.otherstuff and rename .wine.silverlight back to .wine. Did I mention this was ugly?

NB: If you're going to rename these folders through ROX, left-click the "eye" icon up top to show hidden files or you won't see the relevant folders. For terminal, the choose the relevant lines from the following:

Of course, this could be scripted to something that would check for multiple folders, rename accordingly, and even launch Netflix for ya, which I might play with later (emphasis on might... I'm not that good at shell scripting).

Recompiling wine now; if it makes any difference I'll post new packages.

EDIT: Yes! Works. And, I was wrong about 85% cpu usage before, was more like 25-28%, now it drops to around 11%. I'll upload new packages tomorrow morning (AEST)._________________Puppy Linux Blog - contact me for access

Sweet, keep up this effort, my free month with another 'netflix' like supplier is over mid month, and then check into any free trial netflix would offer. now if only they had a month of free high speed internet ...

Regarding FatDog and other 64 bit pups, I think this wine would work as long as all deps are installed. Jamesbond built the 32 bit compat library sfs around slackware libs irrc.The problem I foresee though, could be the openGL stuffs. Perhaps extract those from slacko and build then load a separate sfs?

What's the name of the 'netflix' like supplier?_________________Puppy Linux Blog - contact me for access

I managed to run some tests with 01micko's SFS files on frugal installs of both Slacko and Precise 5.5, and uncovered a problem: XATTR is active by default on formatted volumes containing the OS installs (well, at least on ext4 volumes. I didn't test ext2 & ext3 formats), but not within personal save file mounts. This means that while installing Win. Firefox & Silverlight are successful, video playback in Netflix errors with N8156-6022 because the .wine folder created under /root -- .wine being the directory that Wine uses to house its psudo-Windows C: drive, and all installed programs and their temp files used while running -- doesn't allow the setting of extended attributes. Unfortunately, this came as a surprise due to a misconception on my part. Siliverlight itself doesn't require XATTR, but Netflix' playback methods through Silverlight does.

It was much easier to confirm the lack of XATTR on my save files using Slacko than Precise, since Slacko already has attr utilities installed, and attempting to install the appropriate programs & libraries on Precise through the PPM didn't work for me. Here's what I did:

First run df to see how a running frugal install mounts everything. (Checking fstab didn't tell me what I needed to know.)

/initrd/mnt/dev_save is mounted to the main partition on my hard drive and contains my puppy_slacko_5.5.sfs & slackosave.4fs files. Creating a directory in here, then a file within that directory, I checked whether or not extended attributes could be set using setfattr:

Now, with the xattr argument to mount the save file may well work for frugal installs, however this would require hacking of the initrd.gz. This isn't for the feint of heart but could possibly be scripted, hence automated.

...Exactly how involved would this be?_________________Proponent of better living through reckless experimentation.

I used the sfs file in this thread, went through its install and download of mono and gecko, then installed the three files by downloading them off the web and doubleclicking in rox filer rather than using the wget scripts in the howto.

I got everything in, the silverlight drm test worked, and I get to where I get the video playback in Netflix errors with N8156-6022. After it does that, the drm test doesn't seem to work anymore until I restart the browser.

Hi dancytron. For additional background, was your Precise install a frugal or full? I'm guessing frugal, as your results fall in line with my previous post on lack of XATTR support for mounted save files.

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