All posts by albertw

Leftover wine

Decided to make lasagna today. And of course my recipe requires about a third of a bottle of red wine. After quick glance at the wine in the house, I came to the same conclusion I always do when cooking – all of that is too good to cook with. Since I was going to lidl anyway for the veg I thought I’d just pick up a cheap bottle while there. At the moment there is a special 6 for 4 promotion on wine, and a case of 6 bottles costs about €20. That’s under 3.50 a bottle. I was thinking that this might make ok wine to cook with, and failing that something to use as antifreeze in the winter. So after making the bolognaise I was left with the tricky problem of leftover wine. Yet again disregarding the advise of Delia Smith I opted for the simpler solution of just drinking it. And its nice! Probably the cheapest wine I have ever bought but tasty. Time to take care of the rest of this leftover wine 🙂

Whats needed to get Lightmeter software working on a sheevaplug

Basic instructions are here:

EU Action Alert: Urge Your MEP to Take a Stand for Internet Freedom

Just got this email from the EFF:

Help stop the Anti-Counterfeiting Trade Agreement (ACTA) from steamrolling our rights and freedoms. Please contact your Member of Parliament (MEP) today and ask them to sign a Declaration that takes a stand against efforts to curb Internet freedom in ACTA. Parliamentarians must sign in person before July 8, during the Strasbourg plenary session.

Written Declaration 12 asks EU negotiators to ensure that ACTA respects European citizens’ fundamental rights to freedom of expression and privacy, and opposes provisions that would encourage Internet intermediaries to engage in surveillance or filtering of all Internet users’ communications for potential copyright-infringing material. If 369 members of the European Parliament sign this declaration before July 8, it will become the official opinion of the European Parliament, and send a strong message to the EU ACTA negotiators. Around 253 MEPs have signed, but 116 MEP signatures are still needed — particularly from MEPs in Germany, the U.K., Italy and Poland.

With the latest round of ACTA negotiations having just wrapped up in Switzerland, and only one more round likely to take place, now is the time to ask your MEPs to sign Written Declaration 12 and ensure that ACTA protects the fundamental rights of all citizens and the open Internet. Please write and call the Strasbourg offices of Members of Parliament who have not yet signed before July 8. The list of Members who have not yet signed and require particular attention is here.

There is a narrow window of opportunity for MEPs to take a stand against ACTA — it is only during the Strasbourg plenary session of July 5-8 that MEPs will have an opportunity to sign Written Declaration 12 at the declarations table.  It is crucial that MEPs understand the importance of signing Written Declaration 12 before moving on to the plenary session.

Visit La Quadrature du Net’s campaign page for information and tips on contacting your Member of Parliament.

Here are the Irish MEPS that have not, at the time of writing, signed the declaration. Please read the above links and write to them, the links below link to detailed contact information. In a week when Finland has made broadband a legal right for every citizen its important to not to let these talks limit Internet freedoms.

Brian CROWLEY ALDE (FF)  brian.crowley(at)

Jim HIGGINS PPE (FG) jim.higgins(at)

Joe HIGGINS GUE/NGL (Socialist)  joe.higgins(at)

Seån KELLY PPE (FG)  sean.kelly(at)

Mairead McGUINNESS PPE (FG) mairead.mcguinness(at)

Gay MITCHELL PPE (FG) gay.mitchell(at)

And here are the names of those who have:

Liam AYLWARD, Nessa CHILDERS, Proinsias DE ROSSA, Pat the Cope GALLAGHER, Marian HARKIN & Alan KELLY.

It’s interesting that none of the FG MEP’s have signed this letter.

Remote X displays

Another ‘damn! I keep forgetting how to do that!’ post…

When you want to display something from one unix box to another there are two ways of doing it.
1. Use ssh. You need to use ‘ssh -X’ specifically which will allow X11 forwarding. ssh takes care of setting the DISPLAY variable for you. You also need to ensure that the server is configured for X forwarding:

# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

This just works if you are a regular user, but if you need to display something as another user then you run into problems. For example you may need to run a gui installer that can only run as root.
So heres how to get it to work as root.
Firstly, as your normal user get your DISPLAY variable and the corresponding xauth entry. This can be a little tricky

$ echo $DISPLAY

Now search the xauth list for the corresponding entry. If you got localhost above, then search for the actual hostname. On some systems ‘xauth list $DISPLAY’ may work fine, others you’ll need to search:

$ xauth list|grep :10|grep server
server/unix:10  MIT-MAGIC-COOKIE-1  99410f7406b0f93e6117ae55a72a7eca

Next become the root user, or whatever user you need to be.
Set the display variable and add the xauth entry:

# DISPLAY=localhost:10
# export DISPLAY
# xauth add server/unix:10  MIT-MAGIC-COOKIE-1  99410f7406b0f93e6117ae55a72a7eca

You should now be able to fire up an xterm on the system as the new user and it will appear on your desktop.

2. Use xhosts. This is the more traditional way, but does have a gotcha for newer versions of solaris, which are more secure than previously.
On your desktop do:

$ xhost +
access control disabled, clients can connect from any host
$ echo $DISPLAY

Now log onto the remote system and set the display variable and try an xterm. It will probably fail:

$ DISPLAY=desktop:0.0
$ export DISPLAY
$ xterm
xterm Xt error: Can't open display: desktop:0.0

Whats happening here is that although you have allowed the xserver access control to accept connections from any host, the X server itself isnt actually listening for connections. To change that you need to do the following on your desktop:

 svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen = true 

Then restart the Xserver.
This method will work for all users, so you can log in, become root, then just set your display.

3 ok there are alternative methods if you are really stuck. For example start up a VNC session on the server and view it on your desktop. Though thats only worth doing if you need someone else to be able to view what you are doing.

EFI and SUN Disk Labels

Every now and again an install on a new machine fails for me and I have to google to remember how to change the label. So this time I’m writing it down! has some information on the differences between the two formats

But suffice to say that you cant install Solaris on an EFI disk, you need to change it to an SMI label. Thats done using ‘format -e’.

Select the label option, and then SMI Label. Once you have done that you can check the partition table as normal and your install can progress.

Letter: Council Vandalism of Dalkey Quarry

Dear Councilors & TD’s,

It was with incredulity that I read reports in the Irish Times of the destruction of parts of Dalkey Quarry.

The first recorded climbs by the Irish Mountaineering Council were undertaken in the 1940’s. Today the quarry is used almost daily by climbers and the routes range from the very beginner level up to some of the hardest climbs in the country. It is the only quarry that I know of in Ireland with a guidebook of its routes, and a popular crag with foreign climbers due to its easy access from the city. As someone who grew up a few minutes from the Quarry, I regularly climbed the lower grade climbs and my dog even managed to make it up an easy route on one occasion!

Climbers and residents are rightly annoyed that the council therefore decided to destroy parts of these established climbs. An area that is used for climbing is very unlikely to have been unsafe, if it was the climbers would not be using it, so the actions of the council can only be interpreted as a willful act of destruction. John Duignan of the Irish Mountaineering Club was right to call this ‘vandalising the sport’, a sport which DLRCC should be very proud to have in its county. Then again the councils recent record of preserving important sites in the county is dismal – Carlisle Pier for example…

All such destruction must cease, and any further destruction must take place only following a full public consultation with the public and mountaineering groups. I welcome the reports that talks have taken place today between the MCI and council but that should have taken place last week.

The council should publish any correspondence relating to this decision including any complaints received and any internal letters/emails between council employees relating to the plans. The council employee responsible for taking the decision to destroy parts of the quarry must be immediately removed from employment with the council.

Best Wishes,
~Albert White

Sometimes you can be proud of the EU

The start of 2010 has been an interesting time in the EU. Where, in stark contrast to most places, we seem to be coming up with good legislation and ideas.

February 22nd:
The EU Commission proposes a ban on all commercial fishing of Atlantic bluefin tuna by 2011. Predictably the Japanese are the ones who are protesting most. But you would expect that from a nation that seems to have a policy of making marine wildlife extinct. Release Here.

February 25th:
Since 2000 Israel has enjoyed a special relationship with the EU resulting in exemption of import duties. However the German water filtering company Brita imports good from the occupied west bank, and German customs, seeing the goods were manufactured in illegal settlements denied the company the preferential treatment they expected. This went to the German courts who asked the European Court of Justice for a decision. That decision, came on February 25th and clarified that since settlements in Palestinian territory are illegal under international law that goods from these areas cannot be classified as ‘Made in Israel’ and therefore cannot avail of preferential trade agreements with Israel.

March 10th:
The Anti-Counterfeiting Trade Agreement (ACTA) is a treaty that is being negotiated in secret outside of any established framework. No portions of the discussions have been made officially public and from the leaks it is clear that this is treaty is a very bad one. The Lisbon treaty that is now in force contained a provision intended to make the workings of the EU more transparent and to give the Parliament (the elected bit of the EU) more power, that provision required that the Parliament must have full and immediate access to information at all stages of international negotiations. They clearly didn’t have that with the ACTA so the Parliament voted, by 663 to 13, to demand that this information be made available to them. Not only that but they threaten to go to the Court of Justice if that doesn’t happen.

But the MEP’s didn’t stop there. They scupperd any plans of a so called three strike policy being automatically implemented also. And they also have called for investigations into the issue of warrant-less searches of data while crossing EU borders.

The full press release from the Parliament is here.

Monitoring a BT Voyager 2110

Recently out broadband usage seems to have gone up quite significantly. This, naturally, has been blamed on me. And the Mac. As Min put it “this only became an issue since the mac came into the house!”.

Now you can log into the web interface of the Voyager and get the bytes since it connected. You can also reset some network traffic counters in Status -> Traffic Stats, but none of these really give you a feel for whats happening over time. Enter MRTG. I’ve been using MRTG to monitor traffic on interfaces since college and it’s very good at it. By default it will communicate with a device by SNMP, however the Voyager does not appear to have an SNMP daemon.

Thankfully MRTG can also execute a command to get its data.

You can log into the Voyager using ssh with the admin user and your admin password. This gets you to a very basic shell but one thing you can run is ifconfig which will report on the network interfaces in the box including their TX and TX byte counts.

There doesnt appear to be an easy way to set up public key authentication with the voyager so I fell back on some old school tricks for automating logins – perl & expect.

This expect script will log into the Voyager and get your ifconfig output:

#!/usr/bin/expect -f
spawn ssh [email protected]
expect "password:"
sleep 1
expect "> "
sleep 1
send "ifconfig\n"
expect "> "
send "logout\n"

Next we need to grab the counters from there in a way that MRTG will understand. That is the recieved count on the first line, the transmitted count on the second, uptime is the third and the name is the fourth (mrtg docs). I just use the first and second. ppp_8_35_1 is the interface I need on my router, yours may be different. This perl script calls the expect script above to get the data.


my $flag=0;


foreach $_ (@op) {
    if ($_ =~ /ppp_8_35_1/ ){

    if ($flag == 1 &amp;&amp; $_ =~ /RX bytes:(\d+).*TX bytes:(\d+)/){
        print $1."\n";
        print $2."\n";
        print "0\n";
        print "0\n";

Next we need a configuration file for MRTG. Mine is below. The various options are explained in the mrtg docs

EnableIPv6: no
WorkDir: /var/www/mrtg

Interval: 5

Title[ppp]: Network traffic (ppp)
<h1>Network traffic (ppp)</h1>
Target[ppp]: <code>/usr/local/bin/</code>
Unscaled[ppp]: n
WithPeak[ppp]: ymw

It’s the just a matter of setting up a cron job for MRTG to get the data every 5 minutes:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/mrtg /usr/local/etc/bt.cfg > /dev/null 2>&amp;1

Over the course of a few hours you’ll see the patterns in your usage:
mrtg graph

30 day song challenge in one go

Right. Enough people have messaged me about this on facebook so rather than do the day by day thing, which I’ll get bored of by tomorrow, I’ll just list them all now. This is a bit of an oldskool list; i should do it again with more tunes from this century sometime 🙂

day 01 – your favorite song
Disarm – Smashing Pumpkins
day 02 – your least favorite song
Sinead – nothing compares 2u. Radio gets turned off when this comes on

day 03 – a song that makes you happy
Tequila – Terrorvision

day 04 – a song that makes you sad
Cure – pictures of you

day 05 – a song that reminds you of someone
Tom Petty – Learning to Fly

day 06 – a song that reminds you of somewhere
Garbage – Stupid Girl

day 07 – a song that reminds you of a certain event
Nelly Furtado – Turn Off The Light

day 08 – a song that you know all the words to
Cant find the Clancy Brothers version on youtube – The Boys of Wexford!

day 09 – a song that you can dance to
Nellie the Elephant. I can still picture Skippy holding on to the record player in the teachers club trying to stop it skipping while a roomful of Goths thumped the floor!

day 10 – a song that makes you fall asleep
Chris de Burgh – Don’t Pay The Ferryman

day 11 – a song from your favorite band
I am one – Smashing Pumpkins.
Could have picked any number of songs here.

day 12 – a song from a band you hate
Whipping Boy – any song will do, but here’s We Don’t Need Nobody Else

day 13 – a song that is a guilty pleasure
Whigfield – Saturday Night 🙂

day 14 – a song that no one would expect you to love
Ace of Base – The sign

day 15 – a song that describes you
Hard to answer without coming across as a total muppet.
So I better pick a good song at least. Levellers – One Way, this version from Glastonbury

day 16 – a song that you used to love but now hate
Madonna – Like a Prayer. Just got overplayed at the time.

day 17 – a song that you hear often on the radio
BellX1 – Great Defector

day 18 – a song that you wish you heard on the radio
Temple of Love – Sisters of Mercy

day 19 – a song from your favorite album
Cherub Rock – Smashing Pumpkins from Siamese dream.
Could also bee anything from Doolittle.

day 20 – a song that you listen to when you’re angry

day 21 – a song that you listen to when you’re happy
Something Happens – Hello Hello Hello Hello Hello Petrol

day 22 – a song that you listen to when you’re sad
In the rare auld times

day 23 – a song that you want to play at your wedding
And did! The Foundations – Buttercup (KOH!)

day 24 – a song that you want to play at your funeral
Salve Regina

followed by Prince Buster and Suggs! Madness Enjoy yourself

day 25 – a song that makes you laugh
Wierd Al – Yoda

day 26 – a song that you can play on an instrument
Well I used to be able to play most of it.
The Entertainer – Scott Joplin

day 27 – a song that you wish you could play
Joe Satriani – Surfing with the Alien

day 28 – a song that makes you feel guilty
No song makes me feel guilty. ?
day 29 – a song from your childhood
A-ha – Take on me

day 30 – your favorite song at this time last year
Eliza Doolittle – Pack Up