You are here

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.

Comments

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 run a .net app in wine