Search This Blog

Friday, May 25, 2012

iceweasel amazon prime flash error

When trying to watch a video on Amazon Prime, I got the following error
Sorry we were unable to stream this video. This is
likely because your flash player needs to be updated.
To fix the error, install the following packages
$dpkg -l \*flash\* \*iceweasel\* \*hal\* | grep ^ii
ii  flashplugin-nonfree                  1:2.8.3                              Adobe Flash Player - browser plugin
ii  flashplugin-nonfree-extrasound       0.0.svn2431-3                        Adobe Flash Player platform support library for Esound and OSS
ii  hal                                  0.5.14-8                             Hardware Abstraction Layer
ii  hal-info                             20091130-1                           Hardware Abstraction Layer - fdi files
ii  iceweasel                            10.0.4esr-2                          Web browser based on Firefox
ii  iceweasel-torbutton                  1.4.5.1-1                            transitional dummy package
ii  libhal-storage1                      0.5.14-8                             Hardware Abstraction Layer - shared library for storage devices
ii  libhal1                              0.5.14-8                             Hardware Abstraction Layer - shared library
ii  libkephal4                           4:4.4.5-9                            API for easier handling of multihead systems
ii  libkephal4abi1                       4:4.7.4-2                            API for easier handling of multihead systems
Note:- Some of the packages might be unnecessary. But they are sufficient.

Make sure that the hal daemon is working.
$ps aux | grep hald
116       5715  0.0  0.4  17108  4584 ?        Ssl  20:15   0:00 /usr/sbin/hald
root      5716  0.0  0.1  13980  1588 ?        Sl   20:15   0:00 hald-runner
root      5751  0.0  0.1   5864  1508 ?        S    20:15   0:00 hald-addon-input: Listening on /dev/input/event0 /dev/input/event2 /dev/input/event1 /dev/input/event6 /dev/input/event5 /dev/input/event3 /dev/input/event4 /dev/input/event10
root      5755  0.0  0.1   5860  1244 ?        S    20:15   0:00 /usr/lib/hal/hald-addon-rfkill-killswitch
root      5759  0.0  0.1   5856  1240 ?        S    20:15   0:00 /usr/lib/hal/hald-addon-generic-backlight
116       5777  0.0  0.1   3816  1176 ?        S    20:15   0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root      5778  0.0  0.1   5864  1508 ?        S    20:15   0:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
1000      5826  0.0  0.0   4048   764 pts/2    S+   20:25   0:00 grep hald

Update the flashplugin
$sudo update-flashplugin-nonfree --install --verbose

Close iceweasel window.  Remove the ~/.adobe , ~/.macromedia directories
mv ~/.adobe ~/.adobe_old_deleteafter
mv ~/.macromedia ~/.macromedia_old_deleteafter

Restart iceweasel. The video (and audio) should be working now.

Wednesday, May 23, 2012

awk remove quotes in a column

Consider the input file
$cat input.txt 
"k",1.1
"ka",2.2
"kam",3.3
"kama",4.4
"kamar",5.5
"kamara",6.6
"kamaraj",7.7
"kamaraju",8.8
Convert this to
$cat output.txt 
k|1.1
ka|2.2
kam|3.3
kama|4.4
kamar|5.5
kamara|6.6
kamaraj|7.7
kamaraju|8.8
i.e. remove the quotes in the first column, change the delimiter to '|'.

This can be achieved in awk by defining both '"' and ',' as delimiters.
$cat cmd.sh 
cat input.txt | awk -F "[\",]" -v OFS="|" '{print $2,$4}'
Execute the above script as
$./cmd.sh > output.txt 
Tested on Debian Wheezy using GNU awk 4.0.1 version.

keywords: awk remove quotes from string, get rid of quotes, replace the delimiter character

Followers