The Wonders of (Non) Emulation

As you may know I’ve been using purely Ubuntu Linux om my PC for the last week or two. I’m pretty happy with it, but there was one major problem: Word documents.

Of course there’s a great project called “OpenOffice.org”:http://www.openoffice.org that can work with Word documents, and it works fairly well. However it still messes up more complex Word documents, so I can’t use it, as I don’t want to be resposible for messed-up documents that others still have to work with. So… what to do?

At our university we use CrossOver Office to run Word 2000, Powerpoint etc. under Linux. It works pretty well. Problem is that CrossOver Office isn’t free. However, it is based on a free project called “Wine”:http://www.winehq.com (which is a recursive acronym meaning Wine Is No Emulator). What Wine does is implement the Windows API under Linux. Normal Windows system calls are translated to Linux system calls. Using this technique it is possible to run Windows applications on Linux. Problem is that reimplementing all those Windows DLLs is a lot of work. Not all of Wine’s DLLs work very well. Getting a big beast like Word to work isn’t easy. Which is also the attaction of CrossOver Office, it runs Word instantly.

However, there’s another option: “WineTools”:http://www.von-thadden.de/Joachim/WineTools/. After you’ve installed a Wine version (and don’t necessarily use the newest one, version 20041019 seems to be best), you can install this free tool. What WineTools will do is configure Wine for you and offer you a convenient installer from which you can install all kinds of Windows software.

WineTools

(Click to enlarge)

The fun thing is that when you run software under Wine, it’s really like you’re just running them under Windows. With installers and everything:

Installing IE

(Click to enlarge)

And voila, there’s IE6 running under Linux:

Running IE

(Click to enlarge)

But then why I started all this: will Word run? Wine only supports Word 97, 2000 and maybe XP. Currently I only got a Word 97 and 2003 CD lying around, so I installed Word 97. And lo and behold, it runs perfectly! Arguably it even runs faster than under Windows:

Word on Wine

(Click to enlarge)

And here’s what I really like. The trouble with backing up everything in Windows is that your files are all over the place. There are registry entries, DLLs in the Windows directory, files in Program Files and who knows where. What Wine does is simply create a directory called .wine in your home directory in which everything is stored:

zef@ubuntu:~/.wine$ ls
c quiet-installed-software
config system.reg
dosdevices system.reg.preIE6install
drive_c userdef.reg
fake_windows user.reg
installed-software winetools.log

Yep, the registry is stored in plain text files. And if we look in the fake_windows directory:

zef@ubuntu:~/.wine/fake_windows$ ls
autoexec.bat Mijn documenten Program Files tmp
config.sys My Documents Programme windows
Local Settings My Music temp

It’s just like a normal Windows installation, all in one directory. This means that if I’m happy with my installation I can just zip up the whole .wine directory and I’m done (my zipped version, including Office 97 and IE6, is just over 100MB). If I mess something up, I just remove the old .wine and extract my backupped one. Great isn’t it?

The cool thing is that I even got the “Allofmp3.com Explorer”:http://www.allofmp3.com to work, so I can even keep on download cool music from Linux.