Friday, 23 August 2013

Installing Omnikey CardMan 3x21 in Ubuntu

The OmniKey uses the PCSC spesification, PC/SC (short for "Personal Computer/Smart Card") is a specification for smart-card integration into computer environments.

On Ubuntu Raring (13.04) this can be installed via:
sudo apt-get install pcscd 
sudo apt-get install pcsc-tools

Then download the latest firmware from the hidglobal website (search for the PC/SC CCID version) for x64 system it would be : "CardMan 3x21 PC/SC CCID for Linux X64"

Then unpack the file and run the installer:
cd /home/cccam/ifdokccid_lnx_x64-3.7.0/ 
chmod 755 install
sudo ./install

and lastly run the scanner to search for a card reader in a terminal window
cd 
pcsc_scan

if all go according to plan the following should see:
user@pc:~$ pcsc_scan 
PC/SC device scanner
V 1.4.21 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.6
Using reader plug'n play mechanism
Scanning present readers...
0: OMNIKEY AG CardMan 3021 00 00
Fri Aug 23 20:08:37 2013
Reader 0: OMNIKEY AG CardMan 3021 00 00
  Card state: Card removed, 

Watch SkyGo in Ubuntu

A great new project called pipelight launched that enable the playback of DRM enabled content via a browser plugin in native linux browsers like Firefox and Chrome.

https://launchpad.net/pipelight

I have tested it on Google Chrome 29 and with  a few changes as described as below I could playback SkyGo on my laptop.

The biggest challenge was the fact that SkyGo use the Silverlight 5 libraries and need to report a  "Windows User Agent e.g. Firefox 15 for Windows".

First step is to install pipelight
sudo apt-add-repository ppa:ehoover/compholio
sudo apt-add-repository ppa:mqchael/pipelight-daily
sudo apt-get update
sudo apt-get install pipelight

after that install SilverLight 5.0

sudo apt-get install wine-silverlight5.0-installer

Copy the default configuration file in your user directory:
cp /usr/share/pipelight/pipelight ~/.config/pipelight

and adjust the configuration ~/.config/pipelight such that it matches the specific Silverlight version:
dllPath = c:\Program Files\Silverlight\5.0.61118.0\
silverlightVersion = silverlight5.0

For SkyGo to work change the following as well
fakeVersion = 5.1.20513.0
overwriteArg = minRuntimeVersion=5.0.61118.0

For Chrome install User Agent Switcher  extension and select Windows Firefox 15 from the extension preferences to ensure it reports the correct user agent to Sky. Open the browser and select Firefox 15.
In order to force a reinstallation first close all your browsers and then delete the ~/.wine-pipelight directory.


It will then install the correct Silverlight and apply the "fake version"

Type chrome://plugins/ in the address bar to ensure the plugin loaded correctly.

my complete pipelight config file:

user@pc:~$ egrep -v "^$|^[[:space:]]*#" ~/.config/pipelight
winePath = /opt/wine-compholio/
winePrefix = $HOME/.wine-pipelight/
wineArch = win32
wineDLLOverrides = mscoree,mshtml=
pluginLoaderPath = /usr/share/pipelight/pluginloader.exe
gccRuntimeDlls = /usr/lib/gcc/i686-w64-mingw32/4.6/
dllPath = c:\Program Files\Silverlight\5.0.61118.0\
dllName = npctrl.dll
fakeVersion = 5.1.20513.0
overwriteArg = minRuntimeVersion=5.0.61118.0
overwriteArg = enableGPUAcceleration=false
windowlessMode = false
embed = true
dependencyInstaller = /usr/share/wine-browser-installer/install-dependency
silverlightVersion = silverlight5.0
operaDetection = true
len@madbuntu:~$ sudo apt-get install pipe
pipebench             pipemeter             pipenightdreams-data
pipelight             pipenightdreams       pipewalker
user@pc:~$

Tuesday, 20 August 2013

Duplicate MP's on Linux

DupeGuru Me

 
I know there are thousands of ways to sort out a mp3 collection, numerous bash scripts and mp3id readers and taggers however I never found a solution that work for me.

After some searching I found the following cross platform application called "dupeGuru me" by Hardcoded software, this is a great and simplistic tool and very good fuzzy search.

They have an PPA available at  https://launchpad.net/~hsoft/+archive/ppa

This can be added to your Ubuntu distribution via
sudo apt-add-repository ppa:hsoft/ppa

Raspberry Pi - Python



There are two ways to install the Python GPIO 

Method 1: Download and install / build it yourself:

The source can be found at:  https://pypi.python.org/pypi/RPi.GPIO
To copy it to your Raspberry Pi:
scp -rp RPi.GPIO-0.5.3a pi@[ip address of pi]:/home/pi/Documents/RPi.GPIO/
If you want to build your own version from this downloaded copy, make
sure that you have the Python development source installed first!
On Raspbian:
$ sudo apt-get install python-dev
$ sudo python setup.py install

Method 2: Raspbian repository

If you are using Raspbian, all you need to do to install the latest release is:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio