Creative Live! Cams on Ubuntu 8.04 using ov51x-jpeg

July 16th, 2008

First of all: It should work fine.. so be optimistic :) But you will need to compile a kernel module (ov51x-jpeg) to get it running. Please have a look at Creative’s list to see if your camera is using this module (it will have have an URL saying something like “Ov51xJpegHackedSource”). This is what you have to do afterwards:

$ sudo apt-get install build-essential module-assistant ov51x-jpeg-source
$ cd /usr/src/
$ sudo tar xvfj ov51x-jpeg-source
$ cd modules/ov51x-jpeg/

Unfortunately the source package for ov51x-jpeg is broken and won’t compile with the current Ubuntu kernel. So you have to download the newest source and unpack it somewhere. Then do the following:

$ sudo cp /path/to/newest/source/*.c /usr/src/modules/ov51x-jpeg/
$ sudo cp /path/to/newest/source/*.h /usr/src/modules/ov51x-jpeg/
$ sudo make
$ sudo module-assistant install ov51x-jpeg

To ensure that things are working please run sudo modprobe ov51x-jpeg, insert your camera and check that it’s listed when running lsusb. This should work pretty painlessly and afterwards you can enjoy new wonderful apps such as Gnome Cheese. Yay!

Resources:

Django auto-translation of field values

July 14th, 2008

What’s really nice in Django is the gettext implementation and the _ convention. But when running django-admin.py makemessages we’re not generating any translations for dynamic values such as field values. So let’s say that we have a model and we’d like what’s in it to be displayed in a translated manner. In the new Django development version we’re able to create our own special field types. And we can extend the CharField to provide automatic translation:

1
2
3
4
5
6
7
from django.db import models
from django.utils.translation import gettext_lazy as _
 
class AutoTranslateField(models.CharField):
    __metaclass__ = models.SubfieldBase
    def to_python(self, value):
        return str(_(value))

After that we just add whatever translations we know of to our locale/CODE/LC_MESSAGES/django.po file and run compilemessages.

Tip: Extending Django flatpages

July 12th, 2008

I did a Google search and since nothing came up, I’m writing this little tip on creating your own CMS by extending Django’s flatpages. What’s good about flatpages is that they’re included in Django and has some basic code to get you started. But clearly they’re not enough if you want other people to administer a site.. you’ll want to add extra fields and special help texts for the admin. But we still don’t want to rewrite those ~150 lines of code, and they can really help you get past all the boring stuff and into the action.

Simply do the following:

cp -R /usr/share/python-support/python-django/django/contrib/flatpages my_project/my_flatpages

views.py

1
from my_project.my_flatpages.models import FlatPage

middleware.py

1
from my_project.my_flatpages.views import flatpage

urls.py

3
4
5
urlpatterns = patterns('my_project.my_flatpages.views',
    (r'^(?P<url>.*)$', 'flatpage'),
)

my_project.my_flatpages.middleware.FlatpageFallbackMiddleware has to be added to your MIDDLEWARE_CLASSES and my_project.my_flatpages to your INSTALLED_APPS and you’ll need to run manage.py syncdb, possibly changing the table name in models.py, so it doesn’t conflict with the old flatpages table. That’s basically it. After that you can work on the templates as described in the other howto’s, but now you have your own model to extend.

Rio Karma, Banshee 1.0 and Ubuntu 8.04

July 8th, 2008

Here’s a little step-by-step guide to getting your Rio Karma running on Ubuntu 8.04 with the new amazing Banshee 1.0. But first a little appetizer:

Thumb: Banshee 1.0 with Rio Karma

What we’ll do is fetch some stuff to get the compilation of Banshee working, patch up the source code, compile it and then as a last step we’ll get the kernel module for Karma up and running. So, here’s what you do:

$ sudo apt-get install libkarma0 libkarma-cil libkarma-dev omfs-source
$ sudo apt-get remove banshee
$ sudo apt-get build-dep banshee

Now we have the software from the Ubuntu repos, we’ve removed the old Banshee and installed the software needed for compiling Banshee. But we still need to get the Banshee source code. I prefer grabbing the latest version from SVN as Banshee is still under heavy development, and a lot of bug fixes will have been contributed as of writing this howto.

$ svn co http://svn.gnome.org/svn/banshee/trunk/banshee
$ cd banshee

And now the cool stuff: The patch that installs the support for Rio Karma which has not yet been committed to the trunk of the project. Bob Copeland is the maintainer so let’s all use this moment to send him our best of thoughts. He’s posted a patch here that you should download (look for the latest one). Save it in the same directory as the one with your banshee/ source dir. Now apply it like this:

$ cd banshee/
$ patch -p1 < karma.patch

After that you can compile banshee with the following commands.

$ ./configure –disable-boo
$ make
$ sudo make install

One thing we still need to do is compile the OMFS module for our Linux kernel. The source package in Ubuntu is broken, and what you basically need to do is to grab the latest version of the OMFS module and then overwrite the files provided by the Ubuntu omfs-source package. And only after that use module-assistant to install the module, otherwise the compile fails because something in the kernel API has changed.

$ sudo bash
# cd /usr/src
# tar xvfj omfs-source.tar.bz2
# tar xvfz omfs-0.8.0.tar.gz
# cp omfs-0.8.0/* modules/omfs
# module-assistant build omfs
# module-assistant install omfs
(plugin your Karma)
# modprobe usb-storage

This isn’t such a beautiful solution, but it ensures that we can still benefit from using module-assistant.

Lastly you should disable the Mass Storage plugin (it makes the Karma show up twice) and you cannot currently attach the Karma while Banshee is running.

Alisher Usmanov is a Vicious Thug, Criminal, Racketeer, Heroin Trafficker and Accused Rapist

September 26th, 2007

Apparently this article has been censored by the original host, because the big bad oligarch Usmanov put a legal firm on the hosting company of the author. That’s why I’m bringing it.


September 2, 2007Alisher Usmanov, potential Arsenal chairman, is a Vicious Thug, Criminal, Racketeer, Heroin Trafficker and Accused Rapist

I thought I should make my views on Alisher Usmanov quite plain to you. You are unlikely to see much plain talking on Usmanov elsewhere in the media becuase he has already used his billions and his lawyers in a pre-emptive strike. They have written to all major UK newspapers, including the latter:

“Mr Usmanov was imprisoned for various offences under the old Soviet regime. We wish to make it clear our client did not commit any of the offences with which he was charged. He was fully pardoned after President Mikhail Gorbachev took office. All references to these matters have now been expunged from police records . . . Mr Usmanov does not have any criminal record.”

Let me make it quite clear that Alisher Usmanov is a criminal. He was in no sense a political prisoner, but a gangster and racketeer who rightly did six years in jail. The lawyers cunningly evoke “Gorbachev”, a name respected in the West, to make us think that justice prevailed. That is completely untrue.

Usmanov’s pardon was nothing to do with Gorbachev. It was achieved through the growing autonomy of another thug, President Karimov, at first President of the Uzbek Soviet Socilist Republic and from 1991 President of Uzbekistan. Karimov ordered the “Pardon” because of his alliance with Usmanov’s mentor, Uzbek mafia boss and major international heroin overlord Gafur Rakimov. Far from being on Gorbachev’s side, Karimov was one of the Politburo hardliners who had Gorbachev arrested in the attempted coup that was thwarted by Yeltsin standing on the tanks outside the White House.

Usmanov is just a criminal whose gangster connections with one of the World’s most corrupt regimes got him out of jail. He then plunged into the “privatisation” process at a time when gangster muscle was used to secure physical control of assets, and the alliance between the Russian Mafia and Russian security services was being formed.

Usmanov has two key alliances. he is very close indeed to President Karimov, and especially to his daughter Gulnara. It was Usmanov who engineered the 2005 diplomatic reversal in which the United States was kicked out of its airbase in Uzbekistan and Gazprom took over the country’s natural gas assets. Usmanov, as chairman of Gazprom Investholdings paid a bribe of $88 million to Gulnara Karimova to secure this. This is set out on page 366 of Murder in Samarkand.

Alisher Usmanov had risen to chair of Gazprom Investholdings because of his close personal friendship with Putin, He had accessed Putin through Putin’s long time secretary and now chef de cabinet, Piotr Jastrzebski. Usmanov and Jastrzebski were roommates at college. Gazprominvestholdings is the group that handles Gazproms interests outside Russia, Usmanov’s role is, in effect, to handle Gazprom’s bribery and sleaze on the international arena, and the use of gas supply cuts as a threat to uncooperative satellite states.

Gazprom has also been the tool which Putin has used to attack internal democracy and close down the independent media in Russia. Gazprom has bought out – with the owners having no choice – the only independent national TV station and numerous rgional TV stations, several radio stations and two formerly independent national newspapers. These have been changed into slavish adulation of Putin. Usmanov helped accomplish this through Gazprom. The major financial newspaper, Kommersant, he bought personally. He immediately replaced the editor-in-chief with a pro-Putin hack, and three months later the long-serving campaigning defence correspondent, Ivan Safronov, mysteriously fell to his death from a window.

All this, both on Gazprom and the journalist’s death, is set out in great detail here:
http://www.craigmurray.co.uk/archives/2007/06/russian_journal.html

Usmanov is also dogged by the widespread belief in Uzbekistan that he was guilty of a particularly atrocious rape, which was covered up and the victim and others in the know disappeared. The sad thing is that this is not particularly remarkable. Rape by the powerful is an everyday hazard in Uzbekistan, again as outlined in Murder in Samarkand page 120. If anyone has more detail on the specific case involving Usmanov please add a comment.

I reported back in 2002 or 2003 in an Ambassadorial top secret telegram to the Foreign Office that Usmanov was the most likely favoured successor of President Karimov as totalitarian leader of Uzbekistan. I also outlined the Gazprom deal (before it happened) and the present by Usmanov to Putin (though in Jastrzebski’s name) of half of Mapobank, a Russian commercial bank owned by Usmanov. I will never forget the priceless reply from our Embassy in Moscow. They said that they had never even heard of Alisher Usmanov, and that Jastrzebski was a jolly nice friend of the Ambassador who would never do anything crooked.

Sadly, I expect the football authorities will be as purblind. Football now is about nothing but money, and even Arsenal supporters – as tight-knit and homespun a football community as any – can be heard saying they don’t care where the money comes from as long as they can compete with Chelsea.

I fear that is very wrong. Letting as diseased a figure as Alisher Usmanov into your club can only do harm in the long term.