LUG Planets

Rob Annable: Links for 2008-10-10 [del.icio.us]

Planet WolvesLUG - 8 hours 23 min ago
  • Instiki
    Rails wiki recommended to me at be2camp
  • Confluence
    Enterprise 2.0 wiki with Office integration

Jono Bacon: First Review

Planet WolvesLUG - Fri, 10/10/2008 - 22:12

Rich Johnson (nixternal) on listening to the completed Severed Fifth album Denied By Reign:

“Oh yeah…this is the kind of shit I want to listen to before I break into someone’s house and rob them.”

Denied By Reign. Released Oct 21st.

Andrew Savory: Speedy mammal

Planet ALUG - Fri, 10/10/2008 - 16:00

Congratulations to my friends and former colleagues at Hippo for making the dutch Fast 50 again. This time they squeezed in at number 20. I don't recall what number they were last year, but either way it's great news.

Camltastic! (Richard Jones): MinGW: Compile software for Windows without leaving your Fedora machine

Planet GLLUG - Fri, 10/10/2008 - 13:42
For the last few weeks I've been focused on the Fedora MinGW project. This project gives Fedora users a compelling new feature: you can build your software for Windows, without ever needing to leave the Fedora / Linux environment. In fact you can do everything, up to and including creating a Windows installer for your customers, without needing once to touch Windows.

To demonstrate how this works, I'm going to show you how to port a simple application to Windows, using Fedora MinGW. The app I've chosen is virt-viewer, a graphical console viewer for virtual machines, written in C.

First we install the cross-compiler environment and any libraries that our program requires. (Until the MinGW packages are accepted into Fedora, you'll have to get them from our temporary yum repository)
yum install mingw32-gcc mingw32-binutils \
mingw32-gtk2 mingw32-gtk-vnc mingw32-libvirt mingw32-libxml2 \
mingw32-nsis mingw32-nsiswrapper
With software such as virt-viewer that is based on the standard autoconf "configure" script, the cross-compiling step is simple. You just have to do:
./configure --host=i686-pc-mingw32
That's all you have to do to configure virt-viewer (and most other software) to cross-compile for Windows.

Now we just do make and discover ... ah, that it doesn't compile. This leads us to the hard part of porting software over to Windows. Windows uses the Win32 API instead of the usual POSIX / libc API found on Linux.

For virt-viewer there are several problems:

  1. virt-viewer uses some header files like <sys/socket.h> which aren't found under Win32.
  2. We need to include <windows.h> on Windows (but not on Linux). For Win32, this header file is analogous to <stdlib.h> or <unistd.h>, and almost every C source file should include it.
  3. virt-viewer makes some Linux-specific system calls which aren't available in the Win32 API. The problematic calls are:

    • usleep (sleep for a specified number of microseconds)
    • fork (create a subprocess)
    • socketpair (create a pipe to communicate with the subprocess)

Problems (1) and (2), the missing header files, are easily solved in a very portable way. For each header file which is missing on Windows or Linux, we will just add a configure-time test and some #ifdef magic. Into configure.ac we put:
AC_CHECK_HEADERS([sys/socket.h sys/un.h windows.h])
and then into the C sources files we put:
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
and so on.

Problem (3) -- missing APIs -- are the hardest problems to solve. In general there are three strategies we could try:

(a) Try to find an equivalent but different API which is present on Linux and Windows. As an example here, Windows has a call which is very similar to pipe, and might be used to replace socketpair.
(b) Write a replacement function for each problematic API.
(c) Comment out the particular feature in the code which uses the missing calls. This is less satisfactory of course: Windows users will now be missing some feature.

We're going to fix problems in (3) with a mixture of strategies (b) and (c).

Windows doesn't have usleep, but looking at MSDN I see that it does have a function Sleep (DWORD milliseconds) which can be used as a replacement for usleep.

You can test and replace functions conditionally by adding this to configure.in:
AC_REPLACE_FUNCS([usleep])
Remember that you don't want to replace this on Linux and any platforms that have usleep, and that is what AC_REPLACE_FUNCS does.

The code to implement usleep is now placed into a single function in a file with the same name, usleep.c:
#ifdef WIN32
int
usleep (unsigned int usecs)
{
unsigned int msecs = usecs / 1000;
if (msecs < 1)
Sleep (1);
else
Sleep (msecs);
}
#endif

The magic of autoconf will ensure this file will only be linked into the main program when it is needed.

As for fork and socketpair, it turns out we are quite lucky. These two calls are only used to implement a specific virt-viewer feature, namely tunneling connections over ssh. If you conclude, as I did, that ssh isn't that common on Windows machines, then you can do as I did and just comment out that feature conditionally when building on Windows.

With those changes, we have now completed our port of virt-viewer to Windows (full patch). After rerunnning:
autoconf
./configure --host=i686-pc-mingw32
make
we are left with virt-viewer.exe, a full Gtk application that runs on Windows.
Creating a Windows installer
To package up Windows applications into full-featured installers, that include menu shortcuts, desktop icons and an uninstaller, we wrote a little helper program called nsiswrapper. As its name suggests, it is a wrapper around the NSIS Windows Installer, which we also ported over to run natively under Fedora.

You'll need to wrap up not just virt-viewer.exe, but the Gtk-related DLLs and helper modules. With nsiswrapper you would do:
nsiswrapper --run \
--name "Virt-Viewer" \
--outfile "Virt-Viewer-for-Windows.exe" \
--with-gtk \
/usr/i686-pc-mingw32/sys-root/mingw/bin/virt-viewer.exe

Simon Stevens: Hope and Change

Planet HantsLUG - Fri, 10/10/2008 - 13:38

The Psalm for morning prayer today

I cry aloud to the Lord; •
to the Lord I make my supplication.

2I pour out my complaint before him •
and tell him of my trouble.

3When my spirit faints within me, you know my path; •
in the way wherein I walk have they laid a snare for me.

4I look to my right hand, and find no one who knows me; •
I have no place to flee to, and no one cares for my soul.

5I cry out to you, O Lord, and say: •

‘You are my refuge, my portion in the land of the living.

6‘Listen to my cry, for I am brought very low; •
save me from my persecutors, for they are too strong for me.

7‘Bring my soul out of prison,
that I may give thanks to your name; •
when you have dealt bountifully with me,
then shall the righteous gather around me.’

It is hard to know where economics stops and sociology starts. This crisis seems to be as much about psychology as it is about anything happening in the actual economy.

This all got started because people believed something that was not true, that the price of houses always climbs, that when it does everyone who owns a house is better off and it is normal to earn 10% a year on an investment.

This is not about greedy bankers, they just did their job, maximising their shareholder's dividends selling a product everyone wanted to buy. This was about everyone of us wanting to be better off and now it is about everyone of us fearing the worst.

If this is primarily a social phenomenon rather than an economic one then it is only going to come to an end when there is an event, that puts down a strong marker that change has happened. I think this can only be clear and obvious change at the top, something that seems to herald a new dawn, even if it does not actually do that.

I believe that a break with the past is the only thing that will bring about the end of this crisis and the opening of what happens next.

And I think that the American Electorate is now, decisively and irreversibly, also coming to this view.

James Ogley: The Second "Debate"

Planet HantsLUG - Fri, 10/10/2008 - 12:00

I caught some of the second presidential "debate" via The Daily Show and what struck me was not McCain's derisory referral to Obama as "That One" nor his addled wanderings around the dais as Obama was speaking.

No, what amazed me was how almost life-like he looked.

Michelle Obama did a great job too. If you missed her, take a look.

James Ogley: Mum's gone to...

Planet HantsLUG - Fri, 10/10/2008 - 12:00

We're well used to hearing about states that allegedly sponsor terrorism - indeed, we can name the usual suspects easily: Iran, North Korea, the USA, Israel (sorry, two of those just enact terrorism themselves directly).

Now it seems we can add a new name to the list. Icelandic bankers are apparently terrorists. Why else would our government have employed anti-terror legislation to freeze Icelandic assets in the the UK? Surely those lovely Nordic types (statistically the most beautiful nation on earth apparently) with the coolest named banks in the world (Landsbankinn anyone?) can't be that big a threat to global peace and security?

A cynic might suggest that this demonstrates that the laws in question are framed in such a way as to allow the government to do pretty well whatever it likes. Yesterday, in the Lords, Lord Onslow said roughly that.

Andrew Savory: Going down a storm

Planet ALUG - Fri, 10/10/2008 - 07:43

I got a chance to play briefly with the new Blackberry Storm yesterday.

First impressions were that it feels bulkier than the iPhone, but is a nice enough looking device. I wasn't too keen on the italics on the keyboard, but the tactile feedback was interesting: instead of having movement on individual keys, the whole screen clicks in and out on key presses. A clever idea, but I'm not sure it's much more than a novelty.

Here's the thing: in a few years' time, will people even expect keys to move when you press them? Already I find cognitive dissonance when I switch from my iPhone to a laptop after extended periods of writing: I'm used to audible feedback instead of tactile feedback (not to mention wishing I could swoosh windows around the screen with my fingers, and pinch/stretch to resize them with gestures).

So whilst the BlackBerry might be good for old-timers wanting the latest shiny-shiny, I don't think it's a game-changer, iPhone-killer, or anything-special... though it is about a billion times better than the other Blackberry handsets.

Technorati Tags: , , , ,

Daniel Pope: SVG Buttons

Planet HantsLUG - Thu, 09/10/2008 - 23:39

With SVG filters, it’s easier than ever to create stylish graphical buttons for the web.

Using images for buttons is a much more pragmatic approach than attempting to style buttons with CSS, at least until widespread support for CSS3’s draft-but-stable border-image property is available.

Up until a couple of years ago, I had generally created buttons using a PHP script that glued them together:

This was a useful when working with XSL, allowing me to simply call a template to include an arbitrary button text, rather than linking to a static button image.

Because I now use Django for most of my sites, this technique is no longer relevant. Because I’m not now producing templates to transform an arbitrary XML model, but producing templates to render specific models, I know when writing the template what buttons it will require. A typical button, designed for editing convenience, would look like this:

This button is a rounded rectangle with a gradient. The label is typed twice to give it a slightly inset look. Even though you have to retype the label twice to change a button, it takes only a few seconds to change the label and adjust the width of the rectangle to fit.

Inkscape 0.46 provided access to a wide range of SVG filters, making the process even simpler. Buttons are now never more complicated than a rectangle, a label, and the SVG filters to make them look pretty and three-dimensional:

Changing a button is as simple as it can be. Or is it?

I sometimes like to connect adjacent buttons into one strip, something which will be familiar to Mac OS X users:

SVG filters can make this a doddle too. By using SVG filters to create all of the graphical effects, including the rounded corners, these buttons can be dragged together and automatically connect with one another. The filter is applied to the layer, and the above buttons are editable simply as rectangles.

Try it: Download the SVG (Inkscape 0.46+ recommended).

Huw Lynes: Is Effort A Myth?

Planet GLLUG - Thu, 09/10/2008 - 17:52

Seth Godin deserves a pat on his shiny, bald head for this. I got lucky when I landed my first job at MPC. But I’d also spent a year immersing myself in Linux on my own time. Like the man said: luck is preparation meeting opportunity.

Of course, you could still get run over by a bus.

James Ogley: Worship: Variety or Consistency?

Planet HantsLUG - Thu, 09/10/2008 - 12:00

In our worship, is variety the spice of life or does consistency build community? Where do we strike the balance between the two?

As a minister in the Church of England, I have a wide variety of authorised liturgy available to me to use while remaining within a consistent shape and pattern of worship. As a leader in the Church of God, I have a duty to help his people engage with him in corporate and collective worship by making it both familiar enough to connect with and sufficiently fresh as to not grow stale (see the connection between freshness and a lack of staleness).

It's never an easy balance to strike, especially as there is the added layer of working in a multimedia world with an increasingly media-literate population (and indeed, those of the emerging generations for whom a rich diet of media is expected) - the temptation to use cool new worship resources for the sake of it or to satisfy one's own taste is strong. Undoubtedly, employing a variety of media in worship can help keep worship fresh while maintaining consistency - I saw a fantastic way of presenting the Eucharistic prayer at college last week, an audio-visual presentation to accompany the president in place of simply projecting the words or the words with a static image (inevitably, normally, of bread and wine) onto the wall or screen.

There is a real air of permission-giving the Church of England, the sheer number of alt.worship groups is evidence of this. This may well be in part down to the fact that a lot of alt.worship is profoundly liturgical. Where our history is not only recognised but honoured, it is easier to give permission for the expression of worship to be changed, updated or adapted.

I hope that in Bursledon, we are moving towards striking this balance well. Our Conversations service (which will soon see a tweaking of style) and our 1662 Communion (as well as the various other services we run) show that there are a number of points within the cloud where we reside. I use the word cloud rather than continuum or the more ecclesiastical candle because I don't think that worship shows a linear move from liturgical to experimental or catholic to evangelical but rather it's a cloud with three (or more) dimensions in which people move.

So, variety or consistency? It's a balance, we can have - and indeed need - both. We need to keep worship fresh while also remaining grounded. We move towards the future while honouring and being nourished by the past.

James Ogley: 26 days to go

Planet HantsLUG - Thu, 09/10/2008 - 11:00

Until the people of the USA go to the polls and it's looking like it might be a landslide for Obama. People ask me (they really do) how I think it's going to go and for a long time (even back when the polls were showing a roughly tied electoral college) I've been predicting an Obama win in the region of 100 electoral college votes. The polls are now showing more than that - getting towards the region of a 200 point gap. With each debate being adjudged to have been won by the democrat candidate (both the presidential candidate and the VP candidate), the gap just seems to show a widening trend (see the trend here) and with enough states already polling outside the margin of error for Obama to give him the 270 votes he needs, it's his election to lose now.

Bush states polling for Obama currently include (electoral college votes and %age of 2004 vote that went to Bush in brackets in each case) FL (27, 52%); IA (7, 50%); MO (11, 53%); OH (20, 51%); VA (13, 54%).

James Ogley: Playing catch-up

Planet HantsLUG - Thu, 09/10/2008 - 11:00

The weekend before last, I was at the IME Residential which was led by Jonny Baker. A really interesting time thinking about creativity in a post-modern context. One of those times whose value was not in the new information imparted - for me there wasn't much - but in knowing that Jonny had been approved by the diocese to come and talk about this stuff (alt worship, creativity, grasping the culture of the day without being controlled by it...) which was totally speaking my language. Fantastic. Jonny, incidentally, is a member of Grace, an alternative worship community based at St Mary's, Ealing.

After that, I had a night at home before heading up to Nottingham to spend a week at college doing the Introduction to Theological Method, kicking off my MA. It was a fab week - my mind was really stretched which anyone who knows me knows I value enormously. I also managed to catch up with a few people and to go play in the £10 Hold'em tournament at the Circus Casino in Nottingham. I was doing well - above average stack with over half the field eliminated when with me in the BB, the button raised. I could tell he was trying to steal the blinds and after the SB folded, I checked my cards, seeing AhQd. I had him covered and so I pushed, which of course would put him all-in. Incredibly, after correctly naming my hand ("a strong Ace" he said), he made the call and flipped over 9c8s! The flop didn't help him but a 9 came on the turn. I didn't improve on the river and I was left crippled. We were playing 6-handed at that point and so the blinds got back round towards me very quickly and I was card-dead. Had a great night though.

Speaking of poker, the London leg of the fifth European Poker Tour happened last week. I was keeping up with the action via the PokerStars blog and this entry made me laugh.

MJ Ray: Listening to the Social Entrepreneur

Planet ALUG - Thu, 09/10/2008 - 07:39

Today, I shall be mostly at Listening to the Social Entrepreneur. If you’re in the area and have something to say, leave a comment here to contact me. (Comments won’t appear here until this evening, sorry.)

I’ll write a review post after the event.

Aside: Councils are worried about their Landsbanki deposits - thankfully, Kewstoke isn’t one of them, but ow! Yet another way that the banking problems will increase taxes.

Dean Wilson: October London Python UG

Planet GLLUG - Wed, 08/10/2008 - 22:48
I made it along to my first ever London Python User Group tonight, and from what the regulars said about the turn out so did a lot of other people. Over 50 people in attendance is very respectable.

The first talk was a bit of a let down, it felt really long, quite slow moving and could have been much better as a lightning talk. Shame it was the best part of over an hour. Luckily the lightning talks themselves were good. Even though I'd seen a couple of them before at PyCon UK. PySmell, which is actually an IDE intellisense / auto-completion helper rather than anything to do with refactoring, is interesting (and you can read the slides online) and Metaclasses in Five Minutes (which took seven minutes) were both highlights of the evening.

ThoughtWorks have very nice offices in London (with a great view) and I'm looking forward to the next one. Kudos to Simon Brunning for organising it and let's hope Leon has the same turn out for tomorrows London.pm tech meet.

Adam Trickett: DA.org: 10 000 Users

Planet HantsLUG - Wed, 08/10/2008 - 22:35

I don't know if anyone noticed but this site just passed 10 000 registered users on 4 October 2008. I don't know how many are active, but we should all give ourselves a pat on the back - then get writing articles...

Steve Pearce: Fixing Adobe Flash on Fedora 9.

Planet ALUG - Wed, 08/10/2008 - 20:59

Fetching Adobe flash “the Firefox way” failed for me, here’s a screen-shot of the error:

And here’s a solution:

  1. Go to http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash and obtain the *.tar.gz build.
  2. Open a terminal (ALT+F2, gnome-terminal, Run)
  3. cd to the directory containing the downloaded tarball. It’s usually in $HOME/Download if you kept to the defaults.
  4. tar xvf install_flash_player_9_linux.tar.gz
  5. cd install_flash_player_9_linux/
  6. ./flashplayer-installer and follow the instructions.

Then you’ll need to fetch libflashsupport. This will give you audio.

  1. su -c ‘yum install libflashsupport.i386′

Hugo Mills: Licensed to...?

Planet HantsLUG - Wed, 08/10/2008 - 16:46

I've been trying to work out how to get a copy of Windows XP to run in a VM at work – not that I actually want one as such, but it's useful to have for those Word documents that OpenOffice won't open, and for the occasional website that requires IE. The machine I'm using was supplied with Windows, and has an XP license sticker on it, with a license key. This would seem, on the face of it, to be fairly straightforward.

After some digging, I arrive at what seems to be the relevant place on our internal systems services website. We apparently have a site license for Windows and Office for the whole organisation. This is good. The MS Campus Agreement allows me to install Windows and Office on a University PC, which is what I want. So I follow the link for "Installation Instructions"…

read more

Andrew Savory: Green is the new black

Planet ALUG - Wed, 08/10/2008 - 16:08

It occurs to me that, in years to come, adages such as "I used to walk ten miles to work. Uphill. In the snow. With no shoes." will be replaced with "I used to run make with single-digit values for -j".

There'll also be a whole generation who have never compiled a linux kernel. Or removed a bunch of modules to get more speed / less memory usage. Or who know 'apt-get install' is the real way to do package management (not with a GUI). Or even ./configure; make; make install.

It's weird to be back in linux. I feel like I should be using the console all the time, but Ubuntu has so many shiny graphical utilities for managing things, it seems rude not to use them. I fear OS X has corrupted me and turned me into a mouse-wielding drooling moron.

Dave Walker: Linux Expo Live 2008

Planet HantsLUG - Wed, 08/10/2008 - 15:07
October the 23rd - 25th Olympia, London

This is our chance chaps!  The UK hasn’t had an ‘big’ Linux expo for two years.  Sadly last year had to be cancelled.

I’ve literally /just/ had confirmation from the organisers that the Ubuntu UK LoCo has been reserved a stand in the .Org community village.  Hurray!

Two years ago it was a whopping success, and this year stands to be even better.  The actual expo will be co-existing in Olympia with the Mac expo, so it should give us a great chance to show off Ubuntu to people who wouldn’t normally attend a Linux Expo.

It seems Canonical haven’t yet decided if they will be able to attend.  I do know that the organisers did want a speaker to talk about Ubuntu for the main stage, so if you are that person - apply now!  The event could not have had better timing as it is around the same time as the next Ubuntu version, Intrepid Ibex (8.10) release!

Entry to both ‘.org’ exhibitors and attendees is currently free (£12 on the door), so apply here for your FREE tickets.

If you’re a UK Ubuntu Fan, join the community, come along!  If you fancy helping out on the stall, add your name to the volunter section of this page

Syndicate content