Tuesday, 9 December 2008

pocket projector / mythtv / dell mini combo

blimey - home cinema in a bag.
the projector is a 3m MPro 110, and is about the size of a pack of cigarettes.
watchable as 50inch screen

Rowinggolfer - the true linux outlaw

Fab and Dan... move over.

Monday, 8 December 2008

Packages and the PythonPath.

Here's another "blog to self" to archive stuff that I keep forgetting.

The pythonpath variable is a system variable which tells the python interpreter where to look for python modules when an import statement is called. The current shell's pythonpath is a list and can be found by
>>>import sys

on my system this returns
[' ','/home/neil/pycode', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', etc....

the first item on this list is ' ', which means that the current shell's directory is checked, and '/usr/lib/python2.5' is no surprise. Also on the path (not shown for brevity) are some 3rd party python modules I've installed such as wxpython, PIL, PyQt4 etc....

but hang on... what is that '/home/neil/pycode'?

That is there (and unlike other methods survives a reboot) thanks to this line in my .profile file
export PYTHONPATH=/home/neil/pycode

pycode is a directory where I put my own python modules.
Any modules in this directory can be imported by others.
However, I need to be careful of contaminating the python namespace.
Example - If I save a module I've named "sys.py" in there this will be found BEFORE the sys module native to python (because the pythonpath is checked in order)

so.. here's one way around that problem, and A neat way of organising your modules to boot.
Python "Packages".
Packages are just folders which contain other modules AND a file named __init__.py (this file can be and usually is empty)

Example I have a package called "norman" which is simply a folder of modules (/home/neil/pycode/norman) and thanks to the __init__.py trick, I can do import statements like...

>>>from norman import mymodule

if I am still stupid enough to want to write a module called sys.py, and put it in the norman folder... it won't get imported by
>>>import sys

but would by
>>>from norman import sys
>>>from norman import *

but we don't do that, do we??

Thursday, 4 December 2008

Ebay is CRAP!

It's been a while for me, but I ventured onto ebay today to search for a 2nd hand n800 or n810.

I used to love ebay, but I don't think I'll be heading back.
Nothing but "buy it now" offers for peripherals, or doubtful looking re-sellers.

Sunday, 30 November 2008

Prior Art

One thing the 'blogosphere' provides is a place for ideas to be voiced early.

In doing so, presumably this establishes 'prior art' when the idea is widely adopted.

In the spirit of this... I make the following prediction.
Ubuntu 9.10 will be "Killer Kangaroo", "Kinky Koala", "Kissable Kitten" or "Kinetic Kestrel" (or some combination thereof).

Personally I like Kinetic Kestrel the best - "I'm running Kenetic" has a certain ring to it.

Friday, 28 November 2008

Bring on the IT lawyers

I have just written to www.moorcrofts.com a law firm specialising in IT.


My name is xxxx xxxxx, and I am a dentist. My practice is in xxxxxxxx, www.xxxxxxxx.com.
I am also a hobby programmer and linux advocate.

I write to you because I am in a hole with my dental software provider. After 12 years with them, we have just taken delivery of a £13,000+ 'upgrade'.
It is a disaster.

At this early stage, I have written to the business owner expressing my concerns, and asking to meet with him. They are based in xxxx-xxxxx.
I suspect that I will be breaking allegiance with this company in the short to medium term, and would value the advice of a lawyer who is familiar with software licensing. Your firm was mentioned to me by a fellow member of the open rights group.

My ideal outcome would be to get this company to agree to a license which opens up the software to me so that I can help them improve the software, and in doing so, secure my data.
I can understand why they will probably be wary of such a license. However, I would be willing to consider clauses which commit me to continue with them for a period of say 5 years (and continue paying maintenance/support fees for that time - some £2500 per annum)

Obviously, what I would get from this is future freedom, and a system which is not a 'brick' as is currently the case.

If you feel you can help PLEASE contact me.

Kind regards

Database Security.

My database provider has asked me to send them a backup drive by post.

I'm not going to comply. I've sighted this as my reason.

I accept that they need to check the integrity of the data. However, I feel that a request such as this should be in writing so as to create a paper chain showing that a disk in the post was
  1. absolutely necessary given the risk to my business of the possible bad publicity if it goes astray
  2. done with adequate encryption

These issues are on-going.
I need to find myself a good IT aware lawyer, as soon as possible, to help me get these guys on the right track.

Thursday, 27 November 2008

Asking the right question about software licensing.

I have mentioned here before how dissatisfied I am with the software I use the most at work.
I guess lots of people can understand that feeling.

We are having to change the way we work to fit around this software. That is NOT acceptable to me.
Again.. I hear that a lot, nothing unusual there.

However, my situation is perhaps unusual in that I personally made the decision to purchase this software and paid for it myself. (We are talking several thousand pounds).

Also unusual, is that it would be trivial for me to improve the software myself if I had the source code. In fact, I have already written several plug-ins to give me the functionality I desperately need to keep my business running smoothly (functionality destroyed by the recent 'upgrade'). In doing so, I may already have broken my side of the 'license' (not that I've seen one.)

This software is central to my livelyhood.My 'support' contract is due for renewal on 22nd March 2009. I need to clarify my position before then.

Ideally, I want to continue with this software, albeit heavily modified. My staff are trained to use it, and I have 12 years of invaluable data which no other software could lever correctly.

I am writing to the company expressing my dissatisfaction, but after listening to the freedom law centre podcast this morning... I think I need to accept that what I need to do is re-write my contract with this company. I need them to agree to an open-source license of some description.

I would love to hear from anyone who has been in a similar situation.

Sorry for the verbosity of this posting... my thoughts are unclear due to 2 weeks with disturbed sleep. This issue is one I need to get 'closure' on.

Monday, 24 November 2008

Far away friends.

I'll never need to ask Peter64 what time it is with him again.

Now - how to get 'Peter64 timezone' to the repositories?

Saturday, 22 November 2008

the ipython shell

I thought ipython == iron python.

what a pillock I am.
ipython is going to change my life.

thanks to the guys on irc.freenode.net #lottalinuxlinks for pointing out my stupidity, and for not laughing too much.

Tuesday, 18 November 2008

MySQL - exploring a database with python and MySQLdb

Here's a script wrote to explore a MySQL database, and report information on all the tables therein.
note - you need python (surely everyone has the python?)
and MySQLdb - which on ubuntu is simply ~apt-get install python-mysqldb

#! /usr/bin/env python
import MySQLdb
#change the following line as neccesary,
db = MySQLdb.connect(host="localhost",user="YOUR_USER",
cursor = db.cursor()
cursor.execute("SHOW TABLES")
for record in result:
print "TABLE '%s'"%record[0]
cursor.execute("DESCRIBE %s"%record[0])
descriptions = cursor.fetchall()
for description in descriptions:
for field in description:
print field,"\t",
print "_"*50

Friday, 14 November 2008

Goodbye Hotmail

I got myself a hotmail account on the 18th September 2001.

Yesterday I deleted it for 2 reasons.

Firstly, I haven't used it to send mail for over 2 years, because M$ append ad links, and they look like I am recommended said links.

Secondly, the thunderbird plugins which enable webmail/hotmail have (for me) become erratic of late.

So.. good riddance hotmail.

Virtual Jam Sessions.

I had an idea earlier... and put it to some musicians out in IRC land.

rowinggolfer.. imagine a world where musicians can simply join into an online jam session.
various categories of music.
kajarii rowinggolfer: that'd actually be pretty cool.
rowinggolfer You are the man to set up this audio server. 'JamServer' ?
rowinggolfer Kajarii: I had the idea earlier when listening to guitarman4's music
kajarii Nice.
rowinggolfer I believe there is a business here, so I am thinking some more over this idea.
guitarman4 rowinggolfer - there is a tool that allows for collaboration... open source, they beggin for someone to port linux, so far only mac and linux clients http://www.koblo.com
* rowinggolfer checks out koblo.com
rowinggolfer guitarman4: I am thinking... irc type jam server... anyone can start a jam... and the initiator retains "op status", so that if a clueless player joins in... he/she can boot 'em off. then maybe some paid services? where you buy a room, but can charge people to listen?
something like that... dunno
kajarii> yeah, that's a better idea Especially since irc is low bandwidth so you have more room for music.
rowinggolfer It would be cool to lay down a beat then wait for folks to join in.
kajarii How you'd do that in real time with low latency would be an odd thing though.
even sip is very latent.
rowinggolfer Kajarii: good point. UDP?
kajarii yeah, SIP uses UDP.
rowinggolfer lots of dropped packets... but real time.
guitarman4 interstin...
kajarii I wonder if we ran a pulseaudio server on the irc machine which could then do the mixing and send it out to the other machines.
guitarman4 ooooooo.
rowinggolfer Kajarii: I knew you were the man to speak to.
guitarman4 i like that. u know its worth trying out - worst case scenario is it doesnt fly.. wouldnt we need some way of syncing stuff...
i wonder if midi makes more sense.
kajarii yeah, but pulseaudio should take care of that. or jack.
guitarman4 really? k
kajarii jack is designed for low latency pro audio work.
guitarman4 yeah. so how would we connect to the jack server remotely
kajarii I wonder if we had everybody run a jack instance on their machine then hook them all together somehow. I'm not sure.

Friday, 7 November 2008

Digital Dental Records

Last week I was a free software/open standards advocate.
Today, due to my work IT upgrade this week I am a free software/open standards fanatic.

I am a dentist BTW, and we have upgraded our old clinical database to a new version.

This upgrade is to another proprietary, closed source "solution".
That's bad for me and fellow dental practice owners who want high quality, bug free, modifiable, secure software.

However, I realised something that affects a much wider audience... patients.

Dental Records.
We need a minimum standard for a digital dental record that any dental practice in the UK with a clinical database must be able to export to ooxml for dental records if you like.
Note - this is not for my benefit, but for my patients past, current and future they have a right to their data... and it must be in an import/exportable form IMHO.

moving to another practice/country?
want to build a case against me for poor treatment?
want to find out which anaesthetic you had a bad reaction to in 1998?
Need to see your x-ray or intra-oral image data?

no problem. (or at least.. it shouldn't be.. under present legislation you may get a crappy print out if you're lucky)

Tuesday, 4 November 2008

Intrepid - cruft remover


I found the "cruft remover app" today which is new to Ubuntu with the intrepid release.

A neat app if used properly, but will need to gather more information about the packages on a system and the frequency of use etc.. to give the user more info before prompting for removal of a package.

I think the default for most check boxes until that point is reached should be False.

anyway.. this blog sums up the app much better than I could

By the way "cruft"? I bet that wasn't the original name of this app.

Friday, 31 October 2008

RIP Feisty - welcome to the world Intrepid

ok - here's a point for debate.
End-of-life for feisty = 19th October.
Intrepid Launch = 30th October
one option offered to feisty users on http://ubuntuforums.org/showthread.php?p=5962335 is to update to intrepid
I think, therefore, that either

  • feisty end-of-life was premature.

  • the advice isn't ideal.

pedantic? maybe.

I'm sure the ubuntu fanboys will say so.

Thursday, 30 October 2008


George Farris has created a .deb package for the new pitivi release. Pitivi is a very easy to use video editor based on GStreamer.


it installed (with a sensible warning about over-riding the package in the official repos) flawlessly with gdebi.

Tuesday, 28 October 2008

Scott Sigler - podcast novelist

This guy deserves recognition as an internet pioneer.



Scott Sigler was one of the first (if not THE first) unpublished authors to distribute his work in audio form for "free" on the internet, under a creative commons type license.

I have listened to several of his books... namely "Eathcore", "Ancestor" and "Infected".

I would recommend them to anyone who isn't offended by language and violence. You can get them from his site www.scottsigler.com or www.podiobooks.com

"Infected" has been published as a paper novel, and can be purchased from amazon or high street stores... it is currently being considered for a film.

So buy infected if you wish, buy PLEASE pre-order the sequel "Contagious" which is to be released on the 30th December 2008.

How cool would it be for a podcast novelist to be the number one bestseller on the hardback fiction list?

In my opinion, very cool indeed. This is how art should be marketed in the internet age. Give your stuff away in one form, accept donations if it is any good, and charge for it in other formats. Much better than allowing editors to dictate what we get to consume.

If you agree, please buy the book.

Thursday, 23 October 2008

Holiday Highlight.

My wife has fallen for another man.

It's been a while since she looked at me like this!

Friday, 10 October 2008

Radio free Ubuntu Laptop.

Travelling transatlantic tomorrow (yippee!!), and one issue I needed to address is how to turn off my wireless card for the flight (to save battery life and/or stop the plane crashing.. you decide which;)

Here's how it's done -
Turn the thing off -
~$ sudo iwconfig wlan0 txpower off

And back on again-
~$ sudo iwconfig wlan0 txpower on


BTW - bluetooth services are disabled on this laptop... I have no need for it.

Wednesday, 8 October 2008

Capitalism and what it can learn from Open Source

What a mess the world economy is in.

Banks are falling left, right and centre, and governments (i.e. tax payers) around the world are propping them up.
Part of the problem is the way that there is no working regulation of banks.

No-one has been keeping an eye on what they are up to... and how could they?
As I see it, banks do not exchange their trading information with governments, regulators, competitors, shareholders, or customers.

They are totally "closed-source". This has got to change.

Freedom of information legislation needs to be extended to these institutions, I can see no other way.

Tuesday, 7 October 2008

Advent 9112 headphones

My laptop is an Advent 9112

With Ubuntu, the soundcard (Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) - has issues.

In particular, pluging in the headphones doesn't mute the main speakers.

The solution add the following lines at the bottom of /etc/modprobe.d/alsa-base

#I have modified this file on TODAY's Date to get headphones working options snd-hda-intel model=mitac
then restart alsa.
sudo /etc/init.d/alsa restart

Me a spammer??

Oh dear.

This morning I got an email from blogger.com telling me that my blog has been flagged by their automated spam filter, and therefore my blog has been blocked because of a "violation of their terms of use".

My blog is in quarantine and in 20 days this blog may be destroyed!!

anyway, I think the issue may be that I put my httpd.conf file text in the last posting, and this contains some html markup. So I have changed all the > symbols to &gt; and the < symbols to <

(yes it did take an age to type the above sentence, and I have had to go through captcha hell to post this!)

blogger.com please don't kill my blog!

Monday, 6 October 2008

httpd.conf improvement

I noticed today that apache2 on my laptop was executing files in
but not in

anyway, turns out I had configured it incorrectly :(
originally I had added my local cgi-bin as a directory (useful for a directory of scripts in an odd place)
My old httpd.conf file
<VirtualHost *>
ServerName testhost
DocumentRoot /home/neil/ircwebsite
<Directory /home/neil/ircwebsite/cgi-bin>
Options ExecCGI
SetHandler cgi-script

but a ScriptAlias is shorter and works for cgi-bin AND all child folders therein
<VirtualHost *>
ServerName testhost
DocumentRoot /home/neil/ircwebsite
ScriptAlias /cgi-bin/ /home/neil/ircwebsite/cgi-bin/

Saturday, 4 October 2008

Intrepid's improved handling of video

As I posted yesterday, I have moved over to intrepid.
I have noticed a few major improvements over hardy (for me, on my hardware), but a MAJOR improvement is the way that video is handled in windows that are being moved. It just works. Perfectly.

Here's an example - I have totem playing the big buck bunny, and mplayer showing a home movie of the family in Italy. Rotate the cube... and it's no problem!

Flipping cool.
( BTW - I did a sanity check and confirm this isn't/wasn't the behaviour on the same machine in Hardy.)

video on intrepid

The Gnome devs bible part 1.

The sermon on the mount.

"Blessed are the cheese-makers.
for they shall enable the webcams"

not to be taken literally, of course
it refers to all V4linux apps.

(with apologies to Jesus AND monty python)

Big Buck Bunny

alan looks like big buck bunny
I listen to a great podcast called "the linux link tech show" which is mainly about flatulence and mythtv.

One of the less verbose hosts of the show has a striking resemblence to the bunny in the open source movie Big Buck Bunny.

I mention this because I want to upload my first picture to this already infamous blog of mine, so here, with a quick flick of the gimp is the proof.....

rough hack to fix that sudo path issue

remembered how I got the script "~/bin/bright" to be on sudo's path.

# ln -s ~/bin/bright /usr/bin/bright

a bit of a cheat, but it works dandy.
BTW - here is that script.

#! /bin/bash
echo 100 > /proc/acpi/video/GFX0/DD02/brightness

why do I need it? because my brightness buttons don't work unless I disable ACPI :(

Friday, 3 October 2008

Did I forget a something?

I don't want to get caught out again by forgetting to install that killer app.

So what packages did I have installed on hardy?
#dpkg --get-selections > hardy_installed

and now I'm in intrepid?
#dpkg --get-selections > intrepid_installed

so what did I miss?
#diff intrepid_installed hardy_installed > apt-get_wish_list


Taking the plunge into intrepid ibex

I have a memory like a sieve, and constantly find myself googling for solutions to problems I have previously solved. So I decided to start a blog when I manage something I know I'll forget.

Today I am moving my laptop os from ubuntu hardy over to ubuntu intrepid, so there's never going to be a better time to begin?

My laptop is an Advent 9112 - bought early 2008.
Like most users I have a love/hate relationship with this machine.

setup with 4 primary partitions on it's 150GB drive.
rough allocations are
/dev/sda4 ext3 /home 100GB
/dev/sda1 ext3 / 22GB
/dev/sda3 ext3 not mounted 22GB
and the rest is swap

on sda3 I have ubuntu 8.04 (hardy heron) 64 bit - my main OS for 5 whole months!
on sda1 I have ubuntu 8.10 (intrepid ibex) 64 bit alpha 5, updated to wherever this release is today (beta 1?)

today, I finally decided that the intrepid is to become my main OS, so I have added "neil" as a user, and am currently migrating all my settings.

clearly it would be easier and maybe wiser to wait for a "dist upgrade" on the sda3 OS, but I am impatient for a couple of reasons.
1. intrepid appears to handle my wireless card much better than gutsy. Using WICD 1.5.3 the network connection is good enough for mythtv viewing - not the case on this machine since I moved to the 64 bit version of 8.04 (therein lies another story).
2. why the hell not? This machine has nothing critical on it.

One thing I love about linux is the consistency of design where settings and data are stored in the users home folder. firefox (and all it's plugins) pan newsreader, pidgin, xchat, thunderbird etc all moved accross seemlessly.
So too did all my desktop settings.

I do some web development, so I needed
#apt-get install apache2
and of course the settings for apache2 are buried within the system so I mounted the SDA3 partition and did
#sudo cp -av /media/disk/etc/apache2/ /etc/apache2/
#sudo /etc/init.d/apache2 restart
and instantly my local sites are all working as before - hurrah.

now I need to remember how to get sudo to play ball with the scripts in my ~/bin directory which require root permissions to work.
when I do... I'm gonna blog it here, lest I forget again.

BTW - when SDA3 is redundant... I'm going to put arch linux on it, see what all the fuss is about.