All 5 entries tagged Sled

No other Warwick Blogs use the tag Sled on entries | View entries tagged Sled at Technorati | There are no images tagged Sled on this blog

August 07, 2013

Netflix on SUSE Linux Enterprise Desktop

Netflix provide a means for you to watch stuff on your 'smart' TV, your iThing, your Androids and your computer, unless it runs Linux. To watch in a web browser on a computer you need Silverlight and of course there is no Silverlight for Linux. Apparently Netflix are ditching Silverlight, but right now you still need it. Inevitably lots of people using Linux want to watch Netflix on their computer and have been hacking together ways to achieve it. Here is my take on it, which works on SUSE Linux Enterprise Desktop 11 SP3 64bit. It's put together from various sources with some adaptations.

One additional package is needed which isn't included in a default SLED 11 SP3 64bit install and that's alsa-plugins-pulse-32bit. Without that you won't get any sound. Apart from installing that package it's all done as a regular non-root user and everything is kept nice and neat in one single directory.

$ cd 
$ mkdir netflix

Go to http://www.compholio.com/wine-compholio/#download get the x86-64 wine-compholio alien-ized RPM and save it to the netflix directory you just created. Wine Compholio Edition is a build of Wine with special patches which amongst other things, make Netflix work. Hurray for that guy.


Go to ftp://ftp.mozilla.org/pub/firefox/releases/ and get the 32bit Windows version of Firefox. Apparently it doesn't matter what version you get. I used what is at time of writing the latest 17ESR release, 17.0.8. Save the installer to the to the netflix directory

$ cd netflix
$ mkdir wine
$ cd wine
$ rpm2cpio ../wine-compholio-1.5.30.x86_64.rpm | cpio -idmv
$ cd ..
$ export PATH=${PATH}:${PWD}/wine/opt/wine-compholio/bin/
$ export WINEARCH=win32
$ export WINEPREFIX=${PWD}/winerootdir
$ wine Firefox\ Setup\ 17.0.8esr.exe

If asked about a Gecko-Wine installation, say yes. I said yes when I was asked. I ran through this process from scratch multiple times and wasn't always asked though. Couldn't work out why. Anyway, say yes if asked. Select Custom install and untick the option to put an icon on the Desktop to avoid ending up with a weird and unhelpful Firefox icon on your Desktop which launches the Windows version of Firefox. Untick the 'Launch Firefox' option at the end of the install.

Get and install Silverlight 4. I tried Silverlight 5 and Firefox locked up when I tried to watch anything on Netflix. I was able to watch Silverlight video on another website I tried though, which is curious, but so it goes with this sort of thing.

$ wget http://silverlight.dlservice.microsoft.com/download/6/A/1/6A13C54D-3F35-4082-977A-27F30ECE0F34/10329.00/runtime/Silverlight.exe
$ wine Silverlight.exe /q

Get Winetricks and use it to install the Microsoft Core Fonts for the Web. If you don't have these the Netflix player chucks an error and won't play anything.

$ wget http://winetricks.org/winetricks
$ chmod u+x winetricks
$ ./winetricks corefonts

Now make a script to set all the required environment variables and launch Firefox.

$ touch netflix
$ chmod u+x netflix

Open the netflix file with your text editor of choice and paste in

#!/bin/bash
scriptdir="$(cd "$( dirname "$0" )" && pwd )";
PATH="${PATH}:${scriptdir}/wine/opt/wine-compholio/bin/" WINEARCH=win32 WINEPREFIX="${scriptdir}/winerootdir" wine "C:\\Program Files\\Mozilla Firefox\\firefox.exe" http://netflix.com/

Whenever you want to run it

$ ~/netflix/netflix

Watch and enjoy. The first time you watch anything you'll get a Silverlight dialogue prompting you to 'Enable playback of protected content'. Do so if you want to be able to watch anything.

I've found that the video is watchable, but not as smooth as it could be even on a machine with an i7 processor. It seems smoother on that other site I mentioned earlier which again, curious but so it goes. I've found audio to be fine.

If like me you're one of the many people who don't live in the United States of America but occasionally wants to watch something that's available on US Netflix but not your regional Netflix, install the Hula Firefox extension and enable it when you want to access US Netflix.


February 14, 2013

B–em

Follow-up to BBC Computer 32K, Acorn DFS, BASIC from Mike's blag

So I found a better BBC Emulator than BeebEm. It's called B-em. Why is it better?

  • It was last updated about a year ago rather than about 5 years ago. Newer is better, right? Sure it is.
  • It allows easy modification of the keyboard layout, including a menu option to remap A/S to Caps Lock/Ctrl which makes playing Arcadians practical. This is nicer than mucking around with setting an environment variable for SDL to make Caps Lock work like a regular key and using xmodmap to remap keys, which is how I made Arcadians playable with BeebEM.
  • It makes disk-drive like noises when you run disks.
  • Probably other... things... maybe...

I run it on SLED 11 SP2. If you want to do likewise, here's how.

If you don't already have it, get the SLE-SDK from http://download.novell.com/Download?buildid=NgW3ToaagDQ~ and use YaST to add it as an Add on Product.

Install the following packages: cmake zlib-devel libpng-devel libjpeg-devel xorg-x11-libX11-devel libogg-devel freetype2-devel libpulse-devel alsa-devel flac-devel libvorbis-devel alsa-oss automake gcc make gcc-c++

Then, as a regular user, run these commands:

$ cd
$ mkdir b-em
$ cd b-em
$ export PKG_CONFIG_PATH=${PWD}/lib/pkgconfig/
$ export PATH=$PATH:${PWD}/bin
$ export LD_LIBRARY_PATH=${PWD}/lib
$ export LIBS="-L${PWD}/lib"
$ export CPPFLAGS="-I${PWD}/include"
$ curl -L http://sourceforge.net/projects/alleg/files/allegro/4.4.2/allegro-4.4.2.tar.gz/download | tar zxvf -
$ cd allegro-4.4.2/
$ mkdir build
$ cd build
$ cmake -DWANT_LINUX_CONSOLE=on -DCMAKE_INSTALL_PREFIX:PATH=$(dirname $(dirname $PWD)) ..
$ make install
$ cd ../..
$ curl http://kcat.strangesoft.net/openal-releases/openal-soft-1.15.1.tar.bz2 | tar jxvf -
$ cd openal-soft-1.15.1/build
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=$(dirname $(dirname $PWD)) ..
$ make install
$ cd ../..
$ curl http://connect.creativelabs.com/openal/Downloads/ALUT/freealut-1.1.0.tar.gz | tar xzvf -
$ cd freealut-1.1.0/
$ ./configure --prefix=$(dirname "${PWD}") && make && make install
$ cd ..
$ curl -L http://b-em.bbcmicro.com/B-emv2.2Linux.tar.gz | tar xvfz -
$ for i in INSTALL depcomp COPYING compile;do unlink $i; ln -s /usr/share/automake-1.10/$i;done
$ ./configure --prefix=${PWD} && make
$ mv b-em b-em.real
$ cat > b-em << EOF
#!/bin/bash
dir="$( cd "$( dirname "$0" )" && pwd )";
export LD_LIBRARY_PATH="${dir}/lib";
cd "${dir}"
./b-em.real
EOF
$ chmod u+x b-em


Grab the images for your favourite games from somewhere such as Stairway to Hell and run the b-em executable

$ ~/b-em/b-em

F11 shows/hides the menu. Once you've loaded a disk you need to hide the menu again and press Shift-F12 to run it.

Obligatory screenshot:

Arcadians running on B-em

The trick to maximum points in Arcadians is to only shoot the aliens whilst they're swooping down. You get double the points for picking them off whilst they're in motion.


January 03, 2013

Handbrake on SLED 11 SP2 revisited

Follow-up to Handbrake on SLED 11 SP2 from Mike's blag

I decided to figure out what needed to be done to build the currently current version of Handbrake, 0.9.8, on SLED 11 SP2.

If you don't already have it, get the SLE-SDK from http://download.novell.com/Download?buildid=NgW3ToaagDQ~ and use YaST to add it as an Add on Product.

Install these packages: doxygen yasm patch autoconf automake libbz2-devel libwebkit-devel libnotify-devel libgudev-1_0-devel gstreamer-0_10-plugins-base-devel dbus-1-glib-devel libtool gcc gcc-c++ intltool gtk2-devel glib2-devel zlib-devel libogg-devel

Then run the following commands. hbinstdir is where Handbrake gets installed to, change the value if you want. You can omit the lines relating to libdvdcss if you already have that installed somewhere Handbrake will find it, or if you don't want to be able to rip any DVDs that use CSS.

$ hbinstdir=/local/myapps/handbrake/
$ mkdir handbrakebuild
$ cd handbrakebuild
$ curl http://ftp.gnu.org/gnu/automake/automake-1.12.tar.gz | tar xvfz -
$ cd automake-1.12/
$ ./configure --prefix="${hbinstdir}" && make && make install
$ cd "${hbinstdir}"share/aclocal
$ for i in /usr/share/aclocal/*;do ln -s $i;done
$ cd -
$ cd ..
$ curl http://fribidi.org/download/fribidi-0.19.5.tar.bz2 | tar xvfj -
$ cd fribidi-0.19.5/
$ ./configure --prefix="${hbinstdir}" && make && make install
$ cd ..
$ curl http://download.videolan.org/pub/libdvdcss/1.2.12/libdvdcss-1.2.12.tar.bz2 | tar xvfj -
$ cd libdvdcss-1.2.12/
$ ./configure --prefix="${hbinstdir}" && make && make install
$ cd ..
$ export PATH="${hbinstdir}bin:${PATH}"
$ export FRIBIDI_LIBS="-L${hbinstdir}lib/ -lfribidi"
$ export FRIBIDI_CFLAGS="-I${hbinstdir}include/"
$ export LDFLAGS="-L${hbinstdir}lib/ -lfribidi"
$ curl -L "http://downloads.sourceforge.net/project/handbrake/0.9.8/HandBrake-0.9.8.tar.bz2?r=http%3A%2F%2Fhandbrake.fr%2Fdownloads.php&ts=1356991772&use_mirror=garr" | tar xvfj -
$ cd HandBrake-0.9.8
$ sed -i 's/autoreconf -I m4 -fiv/sh autogen.sh/' contrib/libvorbis/module.defs
$ ./configure --prefix="${hbinstdir}" --launch --launch-jobs=0 --verbose

Assuming the build process finishes without errors then install

$ cd build && make install

The binaries have been compiled against fribidi-0.19.5 but they're dynamically linked. So if you have the version of fribidi that's included with SLED installed the binaries will find and use that by default. If you don't have fribidi installed, they'll be looking for something that doesn't exist. So to make the binaries look at the right version of fribidi they need to be run in a wrapper

$ cd "${hbinstdir}/bin"
$ mv ghb ghb.real
$ mv HandBrakeCLI HandBrakeCLI.real
$ cat > ghb << EOF
#!/bin/bash
dir="\$(dirname "\$( cd "\$( dirname "\$0" )" && pwd )")"
PATH="\${dir}/bin:\${PATH}"
LD_LIBRARY_PATH="\${dir}/lib"
ghb.real
EOF
$ chmod u+x ghb
$ cat > HandBrakeCLI << EOF
#!/bin/bash
dir="\$(dirname "\$( cd "\$( dirname "\$0" )" && pwd )")"
PATH="\${dir}/bin:\${PATH}"
LD_LIBRARY_PATH="\${dir}/lib"
HandBrakeCLI.real
EOF
$ chmod u+x HandBrakeCLI

Run Handbrake with

$ /replace_with_whatever_you_set_hbinstdir_to/bin/ghb

The tweak to libvorbis/module.defs comes from http://benjisimon.blogspot.co.uk/2012/04/gotcha-of-day-building-handbrake-on.html

Initially I used LIBRARY_PATH=${hbinstdir}lib/ instead of LDFLAGS but system locations are searched before anything specified in LIBRARY_PATH and if you have fribidi-devel installed that's found first and the Handbrake build fails.

I also initially used export PKG_CONFIG_PATH="${hbinstdir}/lib/pkgconfig/" instead of FRIBIDI_CFLAGS and FRIBIDI_LIBS but the Handbrake build process was still finding the system version. I eventually realised the Handbrake build process sets it's own value for PKG_CONFIG_PATH which overwrites anything you've set.



April 10, 2012

Handbrake on SLED 11 SP2

The recently released Handbrake 0.9.6 doesn't build on SLED 11 SP2, which is a shame. It's probably possible to make it build if you have more patience and knowledge of such things than I have, but 0.9.5 builds fine.

Get HandBrake-0.9.5.tar.bz2 from http://sourceforge.net/projects/handbrake/files/0.9.5/

If you don't already have it, get the SLE-SDK from http://download.novell.com/Download?buildid=NgW3ToaagDQ~ and use YaST to add it as an Add on Product.

Become root and install the packages you need

$ zypper in -y -l yasm patch autoconf automake libbz2-devel libwebkit-devel libnotify-devel libgudev-1_0-devel fribidi-devel  gstreamer-0_10-plugins-base-devel dbus-1-glib-devel libtool gcc gcc-c++ intltool gtk2-devel glib2-devel zlib-devel

Then as your your regular usercode you can do

$ cd /tmp
$ tar xf ~/HandBrake-0.9.5.tar.bz2
$ cd HandBrake-0.9.5
$ ./configure --prefix=/local/handbrake --launch --launch-jobs=0 && cd build && make install

--launch-jobs=0 causes the build process to make use of however many cores/cpus your machine has. On a machine with an Intel Core i7-2600 @ 3.40GHz it took under two minutes. Assuming all goes well, run it with

$ /local/handbrake/bin/ghb

June 17, 2008

Firefox 3, GTK and a downside of Enterprise Linux distros.

N.B. On 6/8/09 Novell updated Firefox in SLED 10 to version 3.0.12. They packaged up newer versions of GTK etc and supplied them as packages with names like firefox3-gtk2. I guess they got tired of backporting security fixes in to Firefox 2, or it became too difficult or just impossible to do anymore.


So Firefox 3 is released today. This is a Good Thing but also highlights a downside of using an 'Enterprise' Linux distro. The Linux version of Firefox has a dependency on the GTK toolkit and Firefox 3 requires GTK 2.10 or higher. If you're using a Linux distro that has an older version of GTK then Firefox pops up a message about how it needs GTK 2.10+ then exits. Given that part of the point of Enterprise distros is that they don't change things like library versions for years at a time, (thus providing a stability lacking in distros that release a new version every 6 months or so), this leaves anyone using a version of an Enterprise distro that has GTK older than 2.10 with something of a problem if they want Firefox 3. I am one such person as my main work machine runs Novell's SUSE Linux Enterprise Desktop 10, which has GTK 2.8.

There is of course a solution. (Aside from hoping that someone will release Firefox 3 packages for the version of your distro you're using, which for an Enterprise distro seems unlikley.) Get a new version of GTK and point Firefox 3 at it. Except it may not be that simple since GTK depends on various other libraries, possibly newer versions of those libraries than a distro with a version of GTK older than 2.10 includes. Anyway, this is how I got Firefox 3 running on SLED 10. It should be useful as a guide for other distros though some adaption may be required.

Install some packages

You'll need the following packages installed: openssl-devel, libjpeg-devel, libtiff-devel, libpng-devel. The versions that are included with your distro should do. The names may be slightly different if you're not using SLED 10. Debian and Ubuntu tend to use -dev rather than -devel in package names for example. There's probably other -devel packages you'll need apart from those I've listed and which I already had installed, but you'll find out if that's the case when you try and build stuff.

Download source code for GTK and dependencies.

These are the versions I used.:

Glib - http://ftp.gnome.org/pub/gnome/sources/glib/2.16/glib-2.16.3.tar.bz2
Cairo - http://www.cairographics.org/releases/cairo-1.2.6.tar.gz
Pango - http://ftp.gnome.org/pub/GNOME/sources/pango/1.20/pango-1.20.3.tar.bz2
ATK - http://ftp.gnome.org/pub/gnome/sources/atk/1.22/atk-1.22.0.tar.bz2
GTK - http://ftp.gnome.org/pub/gnome/sources/gtk+/2.12/gtk+-2.12.10.tar.bz2

I used Cairo 1.2.6 because it's new enough that Pango 1.20.3 will use it and old enough that it didn't require me to also build pixman.

Set some environment variables

I found I had to set the following environment variables to get the build to work. Note that the paths reflect where I installed the libraries so change to where ever you decide to install stuff.

$ export PKG_CONFIG_PATH=/local/opt/lib/pkgconfig:$PKG_CONFIG_PATH
$ export LD_LIBRARY_PATH=/local/opt/lib:$LD_LIBRARY_PATH
$ export PATH=/local/opt/bin:$PATH
$ export CPPFLAGS="-I/local/opt/gtk/include"
$ export LDFLAGS="-L/local/opt/gtk/lib"

Build and install

In the order they're listed above, unpack the source code, build and install. The build command is the same for all:

$ ./configure --prefix=/local/opt && make && make install

I installed the packages in to /local/opt since obviously I want to keep it all separate to the libraries that come with SLED 10, that's somewhere non-root users can write to on my machine and not doing this as root eliminates the chance of a typo overwritting already installed libaries. You may of course find some libraries don't build because you don't have some package or other installed so you may find you have to install a -devel package and try again. Edit: If something fails to configure or build then read the errors. Look at what libraries are mentioned then see if you have the -devel packages for those libraries installed. If not install them then try again. If you get an error about cups-config not being present then install the cups-devel package. Also read the comments and see if someone else had the same problem and a solution is suggested.

Make a wrapper script to run Firefox

You'll need to run Firefox via a wrapper script. This is what I use. If you're not using SLED 10 remove or alter the MOZ_PLUGIN_DIR value as appropriate. Replace /path-to-firefox/ with where you unpacked Firefox 3 and /local/opt with where ever you installed stuff.

#!/bin/bash
export LD_LIBRARY_PATH=/local/opt/lib
export MOZ_PLUGIN_PATH=/path-to-firefox/plugins:/usr/lib/browser-plugins
/path-to-firefox/firefox

Edit: I've just realised the MOZ_PLUGIN_DIR doesn't have any effect. I could have sworn that it did. Will have to look in to that.

Edit: Sorted out how to make Firefox 3 uses plugins in /usr/lib/browser-plugins and updated wrapper script.


Search this blog

Tags

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXIV