Aleksandar • Vacić

iOS bits and pieces

PearPC - Mac OS X on PC

I wrote previously about PearPC, great PowerPC emulator. Since then, significant progress has been made. Most importantly, with a little outside help, network access is now possible from inside of Mac to your Windows PC as well as Internet.

PearPC enables Mac OS X on Windows

Also, 0.4pre-release version is available for download from various sites (not from official site) which add significant speed improvements. Look for download links on PearPC portal - I have AMD’s AthlonXP processor thus I’m using Richard Goodwin’s build optimized for it.

My PC is AthlonXP 2500+ with 1GB of RAM. I set 512MB in PearPC config file and Mac is pretty usable with such setup. Speed improvement over 0.2 version I tried earlier is enormous and I dare to say that from this version PearPC is a must for web developers that does not have access to Mac machines. This is as low-cost testing environment as you can get. With multiple installation copies and different config files on one hard disk this opens up many possibilities. Like - you can have Jaguar install (with Safari 1.0), one or two Panthers (with 1.1, 1.2 and 1.3 Safari versions) and even Tiger (I do not have it, though).

Now, onward with network installation, which can get really nasty and tricky. It took me 3 evenings of trying this and that until I got it working.

Setting networking between PearPC and Windows/Internet

There are dozens of guides on the Net how to setup this and I tried all of them. And none of them was entirely applicable to my case, but this one was the closest. I have:

  • local network of PC which use Local area connection

  • one of PCs is used to connect to Internet, over modem connection, using Internet Connection Sharing (ICS)

Now, when you install OpenVPN it installs virtual network adapter called TAP-Win32 adapter and also Local area connection X (where X can be 2, 3 or other number) that uses that adapter. All the guides say that I should enable ICS between TAP connection and dial-up connection.

First attempt was to create a bridge over TAP and my local connection. Bridge is a feature which allows one to connect two different network connections so they act as they are one - something like hub that connects two computers. However, that attempt failed with:

an unexpected error occurred while trying to setup network bridge

Very informative. Google is my best friend and it lead me to MS KB article which says that bridge is not possible if one of connections is connected to ICS. So I disabled ICS and made the bridge. However, it did not really worked, as Panther was not seeing this connection. After several tries, I figured out that you need to leave both local connection and TAP connection to these settings:

Individual connection settings

Then make a bridge between those two connections which will give you this:

Network connections after bridge creation

If you do this, do not receive any errors, but bridge is not visible - restart your computer. Windows can easily confuse itself at this stage and for unknown reasons will not show the bridge, even though it does exists. Restart fixes this.

Now we can set ICS again. Right click on dial-up connection, Properties, Advanced tab, check ICS and choose your bridge.

Set Internet Connection Sharing

Now, right-click on the bridge, Properties, choose TCP/IP, Properties, and make sure this is displayed:

TCP/IP settings for the bridge

ICS setting has already filled in Static IP and Subnet Mask, but it leaves Gateway empty. If you don’t enter gateway, you will be able to access that PC from the PearPC-Mac, but not the Internet. Gateway must be identical to Static IP for the bridge and that will then allow you access Internet from inside of Mac.

The last step is to setup Mac. With everything set as described, Mac will use as DHCP server so you don’t have to worry about it. Set this:

Mac Network preferences setup

When you choose Using DHCP, all fields but DNS will be pre filled. If your IP address starts with 192.168.0 then all is fine and you’re 99% done. What’s left to do is to add as DNS, plus add your ISP’s DNS IPs. After this, you can happily surf the Net, access your Windows PCs etc. Just like another computer at home.

Last words: honestly, I’m not really sure which setting enables Internet access from Mac - gateway setting on bridge connection or DNS entries in Mac Network setup. Or maybe both are needed. I don’t even know for sure is ISP’s DNS really needed.

But this is what worked for me, and I’m too tired to play with it anymore.

P.S. Beautiful icon at the top of the post is from Sascha H�hne’s RAD.E8 icon collections Snow.E2 and Minium.