All 5 entries tagged Suse

View all 18 entries tagged Suse on Warwick Blogs | View entries tagged Suse at Technorati | There are no images tagged Suse 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.


June 29, 2011

Update a driver in an initrd file

Recently I found myself wanting to put SUSE Linux Enterprise Desktop 11 SP1 on to machine with a Sandybridge chipset. This was a problem as the e1000e driver in SLED 11 SP1 isn't new enough to support the network card in the machine. Having found an updated driver I still had the problem that I wanted to be able to do installations over the network with AutoYaST and PXE boot. That didn't work because the initrd file being used for PXE boot didn't have the new e1000e driver in. So the install failed almost immediately due to the absence of a network connection.

The solution is to make a new initrd file containing the new e1000e driver. It's far from obvious how to do this but I found the solution at http://www.sharms.org/blog/2007/11/howto-add-updated-e1000-driver-to-sled-10-sp1/ This post is basically just me duplicating the information because you can never have such information in too many places. Also I've expanded it a little bit to include instructions on how to do some bits that I had to work out. You can of course adapt the following for whatever module you might find the need to update.

First of all, make a new directory and unpack the current initrd in to it

$ mkdir -p updated_initrd/initrd_unpack
$ cd updated_initrd/initrd_unpack
$ gunzip -dc /path/to/initrd | cpio -idmuv

Now get the new version of the e1000e module. I found this in an rpm on Novell's website which I needed to download and unpack to get the driver out of it.

$ cd ..
$ wget http://drivers.suse.com/driver-process/pub/update/Intel/sle11sp1/common/i586/intel-e1000e-kmp-pae-1.2.20_2.6.32.12_0.7-1.i586.rpm
$ mkdir rpmcontents
$ cd rpmcontents
$ rpm2cpio ../intel-e1000e-kmp-pae-1.2.20_2.6.32.12_0.7-1.i586.rpm | cpio -idv

Next copy the new driver over in to where you unpacked the initrd

$ cp lib/modules/2.6.32.12-0.7-pae/updates/e1000e.ko ../initrd_unpack/modules/
cp: overwrite `../initrd/modules/e1000e.ko'? y

Now you need to update files called modules.alias and modules.pcimap using information that you get from the depmod command. You can get the information to put in modules.alias with

$ /sbin/depmod -n $(pwd)/lib/modules/2.6.32.12-0.7-pae/updates/e1000e.ko | grep ^alias > /tmp/newaliases

Then I made a copy of the modules.alias file with the information for e1000e removed from it

$ grep  -v ' e1000e$' ../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.alias > /tmp/modules.alias

Add the new information to that file

$ cat  /tmp/newaliases >>  /tmp/modules.alias

And then replace the original file

$ cp /tmp/modules.alias  ../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.alias
cp: overwrite `../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.alias'? y

The process is the same for the modules.pcimap file

$ /sbin/depmod -n $(pwd)/lib/modules/2.6.32.12-0.7-pae/updates/e1000e.ko | grep '^e1000e ' > /tmp/newpcimap
$ grep -v '^e1000e ' ../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.pcimap > /tmp/modules.pcimap
$ cat /tmp/newpcimap >> /tmp/modules.pcimap
$ cp /tmp/modules.pcimap ../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.pcimap
cp: overwrite `../initrd_unpack/lib/modules/2.6.32.12-0.7-default/modules.pcimap'? y

Finally, make the new initrd file

$ cd ../initrd_unpack
$ find . | cpio --quiet -o -H newc > ../initrd
$ cd ..
$ gzip -v9c initrd > initrd.gz
$ mv initrd.gz initrd
mv: overwrite `initrd'? y
$ file initrd
initrd: gzip compressed data, was "initrd", from Unix, last modified: Wed Jun 29 12:31:49 2011, max compression

February 02, 2009

zypper equivalent of yum —downloadonly

Looking at moving from yum to zypper I found myself unable to work out how to get zypper to download packages but not install them. Yum can do this with the downloadonly plugin:

yum -y update --downloadonly

According to this bug report, zypper should be able to do it but I couldn't find any explanation as to how. In the end I emailed the guy who marked that bug report as fixed and he was kind enough to reply and point me in the direction of the keep-packages option. This is a per-repo setting which means download packages are kept in cache. Knowing this a Google search took me here where it is mentioned along with the --dry-run option. So to get zypper to download updates but not install them, enable caching of packages on all repos with

zypper mr -k -all

and then use

zypper -l -y  update --dry-run




November 05, 2008

Altering AutoYaST profiles on the fly…

...or: How to have one or more variants of an AutoYaST profile without having to actually maintain them.

Say you maintain a bunch of machines running some SUSE variant, you install them using AutoYaST so they're all identical but you find that sometimes you want to install a machine in a way which is slightly different to normal. For example, you want to be able to re-install a machine whilst preserving the contents of a particular partition. This presents a problem because it means you need more than one AutoYaST profile, the one you usually use and the variant. If you change the main profile you have to make the same changes to the variant. Maintaining a variant is going to be prone to human error, forgetfulness and possibly problems could be caused by trying to use a variant which you don't realise hasn't been maintained.

Faced with such a situation myself a neat solution occurred to me. My AutoYaST profile is accessed from a web sever at time of installation, so a script on the web server can be used to manipulate the XML on the fly and serve the modified version. This way only one AutoYaST profile has to be maintained but you can can have as many variants of it as you like provided you write a script to produce that variant. E.g. This PHP:

<?php
# reads the autoinst.xml file, alters the partition config data so that
# partitions are re-used rather than created, and /local is not formatted
# then outputs the new xml.

$sourcexmlfile="autoyast.xml";

$data=simplexml_load_file($sourcexmlfile);

foreach ($data->partitioning->drive->partitions->partition as $partition) {
$partition->create="false";
if ($partition->mount=="/local") $partition->format="false";
}

header('Content-Type: text/xml');
print $data->asXML();
?>

saved as a suitably named file on the web server and it's url provided as the source of the AutoYaST profile at install time allows machines to be re-installed whilst preserving the contents of the partition that gets mounted at /local.


Search this blog

Tags

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXIV