Safari 4 on linux with WINE: solved
Date: 27 Feb, 2009
Posted by: admin
In: linux, open source & software
Fixes for the glitches when attempting to run Safari 4 beta over WINE on Linux; information based on WINE HQ post by E A Durbin. Note that I’ve added details beyond what’s there making this a full solution, read on.
Update, 2009-03-01: Dan Kegel has updated winetricks so it should now work without alteration.
Solved: Safari 4 beta over WINE
All the following steps were performed and found to work for Kubuntu 8.10 on AMD64. I accept no responsibility if these steps hose your system, make backups! They provide a solution to running Safari 4 beta on WINE, it’s working for me anyway.
- Install Winetricks
- Modify Winetricks to bypass sha1sums [update: should now be fixed, skip this step]
- Use winetricks to install flash and check corefonts are installed
- Install actual MS Windows XP iphlpapi.dll (IP Help API) and set winecfg to use it
- Run Safari and fix default poor font anti-aliasing of the browser
Winetricks installs flash and corefonts
1. Firstly you need to copy the file at kegel.com called winetricks. It’s a shell script to enable easy installation and fixing of various problems with WINE. I can’t vouch for it but looking quickly through the code it seemed clean to me (I’m not a security expert). I saved winetricks as winetricks.sh in my home directory and then ran:
$ sh winetricks.sh corefonts flash
2. This installed the corefonts (by downloading the corefonts exe files and running them with WINE) but aborted on running the install_flash_player.exe due to a sha1sum error. This I attributed to winetricks not having been updated for hte latest flash player release (which was pretty recent). Quickly looking at winetricks I altered the following lines by adding a # before the expected sha1sums (lines 793-812):
# Active X plugin
# 2008-04-01: old version sha1sum f4dd1c0c715b791db2c972aeba90d3b78372996a
# 2008-04-18: new version sha1sum 04ac79c4f1eb1e1ca689f27fa71f12bb5cd11cc2
# Version 10 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe
# 2008-11-27: 10 sha1sum 7f6850ae815e953311bb94a8aa9d226f97a646dd
download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe #7f6850ae815e953311bb94a8aa9d226f97a646dd
try $WINE “$WINETRICKS_CACHE”/install_flash_player_ax.exe $WINETRICKS_S
# Mozilla / Firefox plugin
# 2008-07-22: sha1sum 1e6f7627784a5b791e99ae9ad63133dc11c7940b
# 2008-11-27: sha1sum 20ec0300a8cae19105c903a7ec6c0801e016beb0
download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe #20ec0300a8cae19105c903a7ec6c0801e016beb0
try $WINE “$WINETRICKS_CACHE”/install_flash_player.exe $WINETRICKS_S
3. Running the previous command works now and the result is the dialogs for flash installation for install_flash_player.exe and install_flash_player_ax.exe now pop-up require a click at the appropriate point in the install.
Find and install iphlpapi.dll
4. Fortunately I’ve a MS WIndows XP install here and so I copied the iphlpapi.dll straight over from there, not wanting to trust the dll’s found on the internet, placing it in ~/.wine/drive_c/windows/system32/ .
Aside: The first hit for me on Google was DLL-files.com, their file may be fine but the size and sha1sum differed to my version, YMMV. [first, downloaded zip; second, downloaded extracted dll; third, copied from local WinXP]
Once you have the necessary DLL in place you need to run
winecfg, choose the libraries tab and add “iphlpapi.dll” in the text field, the default setting of “Native then Builtin” appears to be right, Apply and Close the dialog. Wheesh, nearly done.
Run Safari 4 beta under WINE, fix fonts
5. Now you need to open
~/.wine/drive_c/Program Files/Safari4/Safari.exe – I did this by opening the Safari 4 directory and clicking the Safari.exe binary application file. Hey presto! It works!
Last thing to do is to find the preferences dialog, via the little cog icon on the top-right of the toolbar, go to the Appearance tab and alter the anti-aliasing settings. They’re setup assuming (I think) that you’re using ClearType on XP, but you’re not. I found the recommended “Medium” setting to be best but it’s a close call between that and the “Strong” setting.
Lastly I also altered the Advanced settings to make the developers tools available.
Crashing Safari 4 beta
What doesn’t work?
Well I’ve not tested exhaustively but here are a few of the bugs I’ve found running this Safari 4 Public Beta (528.16) under WINE version 1.1.15 on Kubuntu 8.10 with kernel 2.6.24-21-generic (x86_64):
- Click on “new tab” from the page icon, or using Ctrl-t. Result = crash. This is because the default new tab is for the “show top sites” feature.
- Tabs don’t show, whatever bit of chrome holds the tabs (like Google Chromes tabs) it’s not present when running via WINE.
- Click on “show top sites”. Result = crash (suprise). This must use compositing of some sort that’s not available to WINE. Perhaps someone will manage to trace a DLL for it?
- “show all bookmarks” (book icon, toolbar top-left) causes Safari to hang with WINE reporting a pagefault.
- Attempting to run through “winedbg –gdb” fails to result in an applciation window.
That’s as much as I’ve tested for now.
First impressions of Safari 4 on Linux
Safari 4 beta over WINE is certainly good enough for my purposes of testing web designs against Safari’s version of the webkit rendering engine.
Hope you have fun playing with your new browser!