My words on free/open source software

Sunday, June 27, 2010

HOWTO: Run Plants vs Zombies™ in Linux under Wine (includes how to Register!)

I have to admit that I found PopCap's Plants vs Zombies™ (referred to as PvZ below) interesting. It runs on Windows, Mac and iPhone but not on any Linux yet.

You can download the trial version from the official site above, and it runs amazingly well on a recent Wine, without any special configuration. Well done, Winehq!

Now comes the problem, if you decide to buy it after 60 minutes play, the registration process is a bit hard with Wine. The reason is that PvZ requires an Internet Explorer or Firefox to finish the registration process. Obviously it has to gather some local hardware/system information and upload it to their activation server so that they can know how many machines you are running PvZ on, therefore you won't to able to give away free copies of the game to all your friends. I think this whole thing is OK, though instead of writing codes in PvZ to let it communicate with their server, instead, sadly, they choose to use ActiveX running in IE for this.

Some early posts reported that the registration process can be finished if you install an IE into the same Wine directory. Running IE on Wine is not impossible but hard, especially when IE4Linux project is no longer maintained.

The HOWTO


Now I have found that you can also finished the registration process using not IE but Firefox instead. Thanks for their being in the same free software camp, Firefox runs very well on Wine. Just grab a Windows copy and install it into the same Wine directory.

Then run Firefox in your Wine, go to PopCap's Registration Page, follow the instruction there to download and install the Firefox plugin. After that, close your Firefox (for some unknown reasons, the Firefox Wine process may still linger in the background after its window is closed, run "ps -ef | grep -i firefox" and kills the linger process if need).

Now starts PvZ by running its in your winefile. Because the PvZ and Firefox need to be started in a same Wine instance so they collect the identical hardware/system information. Register it following the normal process. It may fail at the first attempt to start a web browser, keep clicking the "Retry" button until it shows it's waiting for the registration process to finish (it's waiting for web browser plugin to return registration key). Start a Firefox instance from that same winefile program. Go to PopCap's Registration Page, now if your plugin is installed successfully, it should show a web page asking for your POP Order Number, give it and the registration process should finish successfully and the PvZ program should proceed to the game.

It's not rocket science, just nuisance.

PvZ runs very well in Wine during my 2 days play. I can say it's perfectly running on Linux for now.

Known Problems



  1. Sound effects may not work on some machines with some old Wine versions (try upgrade to latest Wine.)

  2. The full-screen mode will be always "full-screen," which means that if you have a non-4:3 screen, it will be slightly torted.

  3. The between-battle preview screen may be a bit slow sometimes, but as soon as the battle begins the speed returns to normal (not sure if it shows similar issue when running on a real Windows.)

No comments:

About Me

My photo
Santa Cruz, California, United States