Viser opslag med etiketten linux. Vis alle opslag
Viser opslag med etiketten linux. Vis alle opslag

søndag den 8. juni 2014

HBO Nordic on Linux Mint 15

HBO Nordic is a subscription streaming video service that offers TV Series and Movies from HBO and its partners. HBO Nordic has apps for iOS and Android and works in a web-browser in Windows so long as the appropriate plugins are installed. The range of content is huge, from classic HBO serials such as The Wire and Sopranos to the latest broadcasts, including True Detective, Game Of Thrones, Penny Dreadful and Silicon Valley.

Unfortunately, by any reasonable judgement, the available apps (and website) are very poor: no search, poor handling of user-favourites etc. The reviews at the App-store tell a sad story. Among the missing features are support for Airplay and Chromecast. Now my particular home setup has our main TV connected to a Chromecast, Linux PC, and a Wii, none of which are supported by HBO Nordic, which makes it hard to get full value from my monthly subscription (which rather suspiciously costs exactly the same as Netflix who do, however, offer chromecast support from my iPad or Android phone).

So what are the chances of getting HBO Nordic to work on Linux - specifically Linux Mint 15? HBO Nordic uses widevine technology - this is a browser plugin that handles authentication and DRM. The actual rendering is done in Flash. Widevine is available for Linux as part of pipelight, so it should be as simple as installing the latest pipelight (e.g. as described at http://linuxg.net/how-to-install-pipelight-0-2-7-on-ubuntu-linux-mint-elementary-os-pinguy-os-and-derivatives ) and then enabling the widevine plugin with
sudo pipelight-plugin --enable widevine
and that does indeed appear to work in the chromium browser. Unfortunately the playback - at least on my setup - was extremely choppy with poor A/V sync. Since the playback is handled by the flash plugin, I figured that changing the version of flash might help. The Chrome browser apparently comes bundled with pepper-flash, which I thought might be the answer. Unfortunately I couldn't work out how to make chrome play with pipelight. My next idea was to try installing pepper-flash systemwide following instructions you can easily find on the net which boil down to
sudo add-apt-repository ppa:skunk/pepper-flash
sudo apt-get update
sudo apt-get install pepflashplugin-installer
Unfortunately all that gave me was
E: Unable to locate package pepflashplugin-installer
and more google-trauma. Eventually by hunting around in synaptic and looking at the available flash-plugin packages I discovered that flash is enabled in chromium via something calling itself the mint-flashplugin package, which claims to be a meta-package for the Adobe flash-plugin. On little more than a whim I decided to remove this package and replace it with flashplugin-installer, which is the upstream ubuntu package, and which actually appears to install an older version of flash:
sudo apt-get install flashplugin-installer
And it works! So there you are. I'm happier (because I can now traumatise my entire family with Penny Dreadful) but not much cleverer. There is a discussion of some of the issues surrounding choice of flash plugin in Mint in the Linux Mint Forum, for anyone who wants to dig deeper. Meanwhile I'm just waiting for HBO Nordic to get their act together and produce a half-decent app with chromecast support or even, dare I suggest, actual support for Linux?

(Update: After recent upgrades to the Browser API, neither chrome nor chromium will work with the widevine plugin, and this is unlikely to be fixed. I tried watching HBO Nordic with Firefox, but although it "worked" the playback was jerky. Fortunately I tried out the Midori web-browser instead and it worked with HBO Nordic like a charm right out of the box.)

mandag den 8. juli 2013

Linux on a Packard Bell ZA8 Netbook

This smart little notebook is a Packard Bell ZA8. With its AMD L110 1.2Ghz processor and 2GB RAM is should be an ideal candidate for use with a moderately lightweight Linux installation. Well that's what my pal Sergei thought.

However the reality was that as soon as he installed Linux on it he noticed massive image corruption on the screen which made it completely unusable. So, since his time is valuable, and mine not-so-much he handed it over to me with a "you get it to work, you keep it". Challenge accepted!

It didn't take much googling (or thinking) to find that the problem lies with the drivers for the ATI RS690M Graphics Controller. The story, so far as I can understand it, is that ATI stopped releasing Linux drivers for this model in 2009 and has never released a full specification for the cards. Modern versions of Linux come with an open source driver, but as ATI haven't released specs, this is badly broken. Try to run with any resolution over 1024x768 and you're screwed, because the video-ram gets corrupted.

Well I admit this was a headscratcher and I followed a lot of false leads, up to and including hacking into the driver to try to disable the video ram. None of it helped, but eventually I found (with some help from Google, of course) an absurdly simple solution - simply set the video-ram down to 64MB in the kernel boot parameters. And so all that was left was to to remember how the hell to configure GRUB 2 (I miss the old GRUB).

For anyone else who might have forgotten, GRUB is now configured by editing the file /etc/default/grub. Mine now looks like

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.vramlimit=64"
GRUB_CMDLINE_LINUX=""

Note the "vramlimit"! Now the only thing left to do was follow the instructions at the top of the file and run update-grub, and I was the happy owner of a functioning Linux netbook. Now should I tell Sergei?

mandag den 24. juni 2013

Nightly Backups over smb

This is just a quickie.

I have a usb drive attached to my boxee box which I share over boxee's inbuilt smb server. This is mounted on my server machine with an /etc/fstab line like:

//192.168.0.100/maxell_hdd /home/csr/boxee cifs user,rw,username=guest,file_mode=0777,dir_mode=0777,guest,auto,uid=1000,gid=1000 0 0

So if I want to backup files from my server machine to the boxee on a nightly basis, how do I do it? rsync is a great tool, but I ran into one problem - every so often the boxee would be offline for some reason or other and the rsync would just copy my files into the mount directory, filling my disk up in no time. So I added a test to see if the boxee was actually mounted. The backup script ended up looking like

#!/bin/bash
#
#
volume="/home/csr/boxee"
if mount | grep "on ${volume} type" > /dev/null
then
  rsync -av --modify-window=1 --ignore-existing  /home/csr/media/Music/ /home/csr/boxee/Music
else
echo 'Nightly sync failed becaue of lack of mount'
fi

I put this in a file /bin/backup.sh and then added it to my nightly cron job.

Update

I've now replaced the boxee box with a NUC Linux box to which I have direct ssh access. This means I can replace the above rsync with something like this:

rsync -av --modify-window=1 --ignore-existing  /home/csr/media/Music/ -e ssh colin@192.168.0.155:Maxell/Music

onsdag den 19. juni 2013

Getting from A to C via B (with ssh)

So this is a very typical, but stupid, real-life problem. I need to get some files from machine A to machine C. I have ssh access to machine A only from machine B. From my local workstation I can access machine B and machine C, but not A (except via B). And to make matters more fun, there isn't enough diskspace on machine B to just move the files there first temporarily. Also I only have root access to my local machine so I can't assume that nice tools like sshfs are installed on the any of the other machines.

Here's my solution:
  • From localhost, create an ssh tunnel B->A:
  • ssh -f B_user@machineB -L 9999:machineA:22 -N
  • Create a mount point for the remote directory
  • mkdir my_mount
  • Mount the remote directory (this prompts for the password on machine A)
  • sshfs -p 9999 A_user@127.0.0.1:/data my_mount
  • ... and just copy the files to machine C,
  • scp my_mount/afile C_user@machineC:/home/C_user/data
     
The crucial part is the third step which mounts the remote directory from machine A on my local machine.