I got Wine working last night with essentially no labor; I don’t know why it’s taken me so long to sit down and try it out. I think I still have a lingering fear, before installing any sufficiently complicated Linux program, that it will be too difficult. But it almost never is; I think there was a time when I had problems getting mplayer to play DivX, but that was really the last time that I needed much tech savvy to get a program running. (Debugging problems — in Windows or Linux or OS X — is another issue, and seems to require savvy no matter where you go.)
But anyway, I got Wine running. Wine allows you to run Windows programs under Linux, at speeds comparable to their native Windows speeds. It’s really pretty bloody amazing. The instant goal was to run WordBiz, the Internet Scrabble Club’s program for playing the game over the Net; friend Seth and I have become Scrabble addicts in the past couple months, and we play each other every night. All it took to get WordBiz running under Linux was:
- Install Wine. If you’re using any reasonably competent Linux distribution, this is a single command. Under Debian, it’s “
apt-get install wine” (run as root, or with sudo); under Mandrake it’s “urpmi wine” or somesuch; and I gather that it’s something like “rpm -i wine” under Red Hat, though I have no experience there. (And you should be using the apt system anyway.) - Download and install the Java 2 Runtime Environment (JRE) — as a Windows program. So download it however you would ordinarily do so, then run “
wine programName”, where programName is the name of the JRE self-extracting archive that you just downloaded. - Download and install WordBiz from the WordBiz link above, again using Wine (the command will be something like “
wine WordBiz17.exe”). - Along the way, Wine will have created — and prompted you for the names of — a series of Windows directories. In my case these are under
~/.wine/fakewindows — there’s fakewindows/Program Files, fake_windows/Windows and so forth. When you install a program, it thinks it’s running inside of Windows, and it creates all the files and Registry entries that it normally would. So now that WordBiz is installed, change into the Program Files/WordBiz directory and run wine WordBiz.exe. If your experiences are like mine, it should run right away with no problems.
This isn’t a 100% drop-in replacement for Windows. For one thing, Microsoft doesn’t let you use Internet Explorer outside of Windows proper — that is, the only way to get IE is through an actual copy of Windows. (Microsoft continues to insist, falsely, that IE is inseparable from Windows.) Wine is a replacement for the Windows libraries, but it doesn’t replace the Windows applications. You’ll still need to buy a copy of Microsoft Word, say, if you want to run Microsoft Word.
I did also spot some glitches along the way. There’s some strange repainting error within WordBiz — possibly related to DirectDraw — wherein it leaves a trail as I drag letters from my slate of tiles to the board. Starting to move another letter will clear away the old trail, but it’s still irritating.
Lest the point be obscured, it’s really pretty amazing that this works at all — and works 90% correctly. I am running a 90%-functional Windows box within my Linux box. I’m almost certain it’s not this easy inside of Windows to run Linux programs.
I’ve often found that one of Linux’s great strengths is its ability to load files and run programs from virtually any format, operating system, or medium. Last year around Christmas, my dad and brother and I spent hours trying to get the Mac side of a Mac/Windows CD to load on my dad’s Windows machine; my brother had his Mac laptop but didn’t have his Mac CD-ROM drive, so the only choice was to open the CD on some other machine and transfer the files over. We couldn’t get it done under Windows without paying for some separate utility, but I promised them that when they drove me to Boston I would load the CD on my Linux machine and put the files up on my web server for my brother to download. It took less than 10 seconds when we got to my Linux machine (you just have to specify the format of the device you’re mounting — mount -t hpfs [deviceName] [mountPoint], I believe, in the case of Mac HPFS CD-ROMs).
Or take Samba, the standard way to share Windows files and printers and so forth with other computers running different operating systems. Using Samba, I printed over a wireless network to my dad’s Windows-networked printer downstairs; I’m almost certain that a Windows machine couldn’t print to a CUPS printer nearly as easily. (Note that OS X now uses CUPS, so Macs would have just as easy a time printing to a Linux printer as I would.)
This ease of exchange could have something to do with the varying incentives for free- and commercial-software producers. Without really thinking about it too much, it strikes me that Microsoft is not going to invest the time to make Windows open Mac disks unless a sizable number of people want it — unless, say, the total cost of developing it is less than the total amount of income it generates (specifically, the total amount of income that people wouldn’t have spent on Windows anyway). The incentives for free software are totally different; few people are expecting to make money from their hacks, so the calculus is totally different. Hackers write code to fix problems that they themselves are experiencing, so it seems reasonable to assume that more little annoying pain points will get fixed under Linux than under Windows.
Incidentally, there is a way to get Windows working 100% correctly under Linux, though I’ve not quite figured out how to get it to work: run an emulator. An emulator simulates a computer inside a computer; any software running inside of the emulator “sees” whatever processors, hard drives, peripherals, memory and so forth that the emulator pretends to have. It’s really pretty impressive. I’ve been playing a bit with a couple Linux emulators — bochs and qemu — and have not quite been able to get them to work. The trouble is that when I “boot” this virtual machine to a virtual CD-ROM drive — namely the Windows NT install CD — the imitation hard drive is completely blank. Adam Kessel suggests that this is because I need to format the virtual hard drive first — by booting to a virtual Windows boot disk, formatting the hard drive from there, then booting from the CD as I normally would. Something’s amiss, but I hope that I’ll get it working presently. One of the big reasons I bought this laptop is so that I could run Windows and thereby support my Windows clients. I hope also to be able to run Groove; we’ll see how well that works.