You are here

March 2009

habanero

habanero is a simple CMS that I wrote using PHP, MySQL, XHTML and CSS. By conforming to web standards it produces valid accessible output. The cheesey strapline for habanero is a little goes a long way.

It enabled me to build a handful of similar sites quickly, and includes features such as a calendar, links and media libraries, a gallery, a guestbook, clean URLs, support for Google Analytics, an in-place database schema update system (to allow sites that are already up and running to get software updates) and an admin interface with a WYSIWYG editor, a contextual help system, and style controls incorporating a colour picker to enable the webmaster to change the appearance of the site without writing any code.

There are a few comments in the code which suggest I started habaenero around 2005. There are still a few sites out there ticking along quite happily on the CMS, but it's not a project under active development any more.

running herbert under wine on linux

After a while using hddtool to manage our Philips HDD120 audio player, I discovered herbert. This is an open-source application written in C#. It's usually run in windows using the .NET framework. I wanted to be able to manage the player from linux - I've now found a way to do this, and I'll explain how.

My first thought was to try and compile the source for herbert using the mono framework. My attempt at this didn't go so well though - not knowing much about C# and .NET, I didn't really know where to start when I got errors trying to compile the source in monodevelop.

Another alternative was to try and use the windows version of herbert under wine. This wasn't altogether straightforward, but with a few little tweaks, I've got it working.

I've recreated the steps to set this up on a virtual machine running fluxbuntu (based on ubuntu, as the name suggests) - that's what the screenshots are of. However, it should work on pretty much any version of linux that you can get wine running on. If you haven't got wine installed already, this will install it on ubuntu - most major distros will have wine in their repositories.

[email protected]:/tmp> sudo apt-get install wine

The herbert installer is a .msi file, so the first step was to figure out how to get wine to install one of these.

[email protected]:/tmp> wine Herbert_1.0.msi wine: could not load L"Z:\\tmp\\Herbert_1.0.msi": Bad EXE format for

hmm... a quick google later:

[email protected]:/tmp> wine msiexec /i Herbert_1.0.msi

...and we're away. The installer gets all the way through, but when it tries to launch herbert at the end, this happens:

install the Windows version of Mono to run .NET executable

...and nothing else. So back to google...

It turns out you can install the windows version of mono inside wine, and this resolves the dependency on .NET

[email protected]:/tmp> wine mono-2.2-gtksharp-2.12.7-win32-5.exe

...brings up another installer. This one takes quite a while, but gets there in the end.

So I tried running herbert again; in ubuntu with full-blown gnome, wine creates menu items for programs you've installed - as I'm reproducing the steps in a fluxbox-based distro, I'll use the commandline, which means going into the (hidden) .wine directory that wine creates in your home directory.

[email protected]:~/.wine/drive_c/Program Files/Herbert> wine Herbert.exe wine: Call from 0x7b844b20 to unimplemented function gdiplus.dll.GdipCreateFontFamilyFromName, aborting err:seh:raise_exception Unhandled exception code c00000fd flags 0 addr 0x7bc42f1a

...so still no cigar. Apparently in the version of wine I'm using (which is wine-1.0 in ubuntu hardy), some gdiplus functionality is not yet implemented.

Now this next step seems like a bit of a cheat, but after quite a lot of searching I came across the suggestion that you can grab the gdiplus.dll file from a windows machine with the .NET framework installed, and copy that onto the linux box so that wine can use it. I hunted the file down on a windows 2000 VM, and put it into wine's system32 directory. Perhaps on a newer version of wine this hack wouldn't be necessary.

[email protected]:~/.wine/drive_c/windows/system32> ll | grep gdi -rw-r--r-- 1 mcdruid mcdruid 2432    Mar 19 21:19 gdi32.dll -rwxr--r-- 1 mcdruid mcdruid 1724416 Mar 19 23:35 gdiplus.dll

This time when I ran herbert, it launched okay but said it was "Unable to find your MP3 Player". Progress! now all I needed to do was enable herbert to see the player as if it were a drive in windows. Wine will let you map drives; in gnome there's a menu item to Configure Wine, which launches winecfg.

When I plug the player into my linux box, it gets mounted at /media/disk by default, so I used winecfg to map this to a drive letter.

And finally, herbert will now quite happily run in linux under wine - the graphics are occasionally a bit flickery, and a few things like playback and drag-and-drop are unlikely to work, but it should be functional (i.e. you can manage the audio tracks on the player).

It might be useful to know that in the absence of drag-and-drop, there are icons at the top of herbert to add files and folders to the player, and you can navigate to the music you want to add (again through wine's drive mapping) that way.

Enjoy.

a guide to using the Philips HDD120 mp3 player without the dreadful Digital Media Manager software

this is a (slightly edited) copy of a post I made on an old installation of drupal 4 here at mcdruid.co.uk in February 2006 - I'm mainly reproducing it as a prelude to my guide to running Herbert under wine on linux.

In this guide on how to use the Philips HDD120 mp3 player without the dreadful Philips software, I'm going to recommend a very good piece of free software which can take over the job of the Philips Digital Media Manager software.

[Edit:] I originally recommended using hddtool but whilst I still think this is great piece of software, I'd now recommend using Herbert instead.

The good news, and the bad news.

We bought one of these excellent mp3 players at the start of 2006. I didn't want to buy and iPod (which is another story), and this seemed to be one of the best alternatives for its features and price.

However, the software bundled with it, Philips Digital Media Manager, is appalling. Luckily, there are a few pieces of free software which make connecting the HDD120 to a computer much less agonising.

So why is the Philips Digital Media Manager so bad?

Apart from anything else, it launches in a fixed size window like this:

the Philips Digital Media Manager launched in a stupidly small fixed-size window

This is on a 1280x1024 desktop, and you can see how much screen space is wasted. There is a lot of information on display with two listings of mp3 files loaded up - one on the computer, and one on the HDD120.

the actual size of the area you've got to work with in Philips Digital Media Manager

this image shows the actual size of the area you've got to work with in Philips Digital Media Manager - I have not scaled this screengrab down at all!

Why on earth would the software designers not allow users to maximise this window?! As it is, all you get is scrollbars aplenty in the uselessly small spaces allocated to each list. Perhaps they were anxious to preserve the silly skinned appearance of the application - I can't think of many other reasons.

Obviously I appreciate that the application has to be useable on a 800x600 display, but is that any reason to lock the display of the application window at such a small size, regardless of how much screen space might be available to make the task of managing your mp3 player a bit easier?

Can you tell this made me a bit angry?

Anyway, there are plenty of other problems - not least of which is the ease with which it was possible to accidentally delete several gigs of mp3 files from the hard disc on my computer.

I wanted to remove some of the mp3s from the list in the DMM, so as to make the task of transferring some tunes to the player a bit more manageable in the tiny space available. So, I selected a large number of mp3s and pressed my Delete key. I thought this would just remove them from the view, or at least would prompt me whether I was sure if it was going to do anything more drastic.

However, what the DMM did was to permanently delete all the files - not even send them to the recycle bin - just permanently delete them. I recovered some of them from the disc using PC Inspector File Recovery, and had others backed up on DVDs etc.. but I did lose quite a few. Which was nice.

Soon after this I decided to stop using the DMM software; if there was any alternative, it could only be better as far as I was concerned.

Oh, another thing though, is that - unless I'm mistaken - the DMM does not offer the facility to transfer mp3s from your player onto the computer to which it's connected. I suppose they'd justify this in terms of DRM, but it's very annoying.

Okay enough complaining, what about the alternatives?

Well, I'll now describe how we're using the mp3 player working only with free software available on the web.

Before we proceed, I must warn you that you will not be able to use the DMM software with your mp3 player as well as using these alternatives. It's not a totally one way ticket; you can wipe your player clean many times and start afresh using either the DMM software, or the alternatives I'm about to describe, but you can't use both at once.

So, the first thing is to wipe your mp3 player clean (that is format the hard disc, and remove all the files on it).

If there are things on there you want to keep, back them up before going any further. You should be able to do this simply by plugging your mp3 player into your (windows) computer, and looking in My Computer. Your mp3 player should appear as another disc drive, and you can copy the files you want to keep to somewhere safe on your PC.

Wipe the slate clean

Once you're absolutely sure that everything important on your mp3 player is backed up onto your computer, the next step is to wipe the disc drive on the mp3 player clean - which you do by formatting it with Windows.

Plug your mp3 player into the computer via USB, and you should see the mp3 player appear as drive under My Computer.

Make sure this is the right drive before proceeding! You should be able to see some folders on the drive - although I think the main folder is a hidden one - make sure you have show hidden files and folders switched on in your Windows explorer (Tools->Folder Options->View) if you want to see this folder.

Sorry - I would be more specific about what you should expect to see on there, but I can't remember, and I'm not going back to using the DMM software to find out!

Once you're sure it's the right drive, right click on the drive, and select Format.

Choose FAT32 as the filesystem, and apart from that you should be able to leave the other settings as their defaults.

This will take a short while.

The next step is to put the firmware onto the mp3 player. This is the program which actually runs on your mp3 player, and allows you to browse through your mp3s and play them.

At present, I'm not aware of any alternatives to Philips' firmware - but luckily, it's very good (especially in comparison to the DMM!).

I'd recommend that you let Herbert deal with the firmware for you - just plug the player in and follow the prompts on screen. Alternatively, you could download the latest firmware from the Philips site (quick link to the most up-to-date firmware at the time of writing) and install it via the DMM - but why would you want to do that?

...the next step is to install Herbert... if you want to do this in linux, here's a guide on running herbert under wine in linux. Using herbert is pretty self-explanatory - but feel free to leave a comment if you'd like any more information about what to do...