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.
mcdruid@marty:/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.
mcdruid@marty:/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:
mcdruid@marty:/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
mcdruid@marty:/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.
mcdruid@marty:~/.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.
mcdruid@marty:~/.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.
Comments
Herbert's author approves!
It's a belated acknowledgement, but I'd like to report that I wrote an e-mail to the developer of herbert after I wrote this article, to tell him I'd got herbert running under linux.
He wrote me a very nice reply, and gave this post a mention on herbert's homepage.
Thanks Steven!
thanks a lot.. helped me to
thanks a lot..
helped me to run a .net app in wine
Many years later...
I just received an email from someone saying they've dusted their old HDD120 off and asking whether I still have a copy of Herbert!
It looks like the Herbert site has gone away, and although there's a copy in the Wayback Machine:
https://web.archive.org/web/20121227150439/http://steven-perry.com/herbe...
... the downloads don't seem to work. (The site mentions this page :)
It turns out that I did have some old HDD120 stuff in a backup, including the Herbert downloads.
Herbert was released under the GPLv2 so with any luck it's okay for me to put those files here in case anyone else is looking for them: philips_hdd120.zip
I've also included a couple of other relevant things from my backup - I believe there's a firmware file which may or may not still be available from the vendor, plus a copy of HDDtool which is an alternative to Herbert. Amazingly the HDDtool website is still up!
For what it's worth, the version of mono that I installed inside wine is still available for download from the project's archive:
https://download.mono-project.com/archive/1.9/windows-installer/4/
As I used fluxbuntu in the steps above, it must have been based on ubuntu 7.10 (!)
I would hope that nobody would object, but to be clear I don't own any rights to these files - I'm putting them up for posterity, in the spirit of digital preservation - and the avoidance of e-waste.
Speaking of e-waste I only recently disposed of our HDD120 which sadly was no longer functional. It's great if anyone's managing to get one working again though!