Safari 4 on linux with WINE: solved

Date: 27 Feb, 2009
Posted by: admin
In: linux, open source & software

Bookmark and Share

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.

  1. Install Winetricks
  2. Modify Winetricks to bypass sha1sums [update: should now be fixed, skip this step]
  3. Use winetricks to install flash and check corefonts are installed
  4. Install actual MS Windows XP iphlpapi.dll (IP Help API) and set winecfg to use it
  5. 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 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 in my home directory and then ran:

$ 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):

load_flash() {

# Active X plugin
# 2008-04-01: old version sha1sum f4dd1c0c715b791db2c972aeba90d3b78372996a
# 2008-04-18: new version sha1sum 04ac79c4f1eb1e1ca689f27fa71f12bb5cd11cc2
# Version 10
# 2008-11-27: 10 sha1sum 7f6850ae815e953311bb94a8aa9d226f97a646dd

download . #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 . #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, 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]

19bab4bd8d99bdde61757a05d40b71da79feea48  iphlpapi.dll
d1b9eede5a4650dc577abc73d81b948a45a36830  ~/.wine/drive_c/windows/system32/iphlpapi.dll

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!

Safari 4 beta running under WINE on Ubuntu

Safari 4 beta running under WINE on Ubuntu

Font smoothing, Safari 4 on WINE

Font smoothing, Safari 4 on WINE

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.

I was actually nicely surprised – running heavy flash sites like YouTube and BBC iPlayer is actually faster (in appearance at least)  than natively under Kubuntu (where flash tends to stutter for me). The web developer tools are as good as you’ll find in Firefox 3 plugins, with the addition of javascript profiling, but appear more integrated despite using separate windows for their displays.

Hope you have fun playing with your new browser!

Useful post? Go on, buy me a treat I promise I'll share!
— recommended donation £2 / $3 / €2.5

20 Responses to "Safari 4 on linux with WINE: solved"

[…] Note my first impressions of Saf4 beta over WINE on Linux are now up. Bookmark this! Hide Sites Tags: apple, browser, linux, […]

[…] running Windows apps in Linux with Wine, or take a look at how to install Google Chrome in Ubuntu. Safari 4 on linux with WINE: solved […]

[…] Linux đã có thể trải nghiệm phiên bản Safari 4 với công cụ hỗ trợ Wine. Blog flapjacktastic trình bày một cách chi tiết cách cài đặt Safari 4 lên hệ điều hành Kubuntu 8.10 […]

David Gerard says:

The main bug for this is – it appears work is in progress on it, so a lot of this won’t be as necessary soon, we can hope!

ammii says:

i can’t install it. i did follow every steps but when I clicked on Safari, it had a tab of Safari with the word “Starting …”. Then, I tried to click on it, it still didn’t work. After that, it appeared from my taskbar!!! I don’t know why at all! well, this is my first try with wine and I’m a newbie of ubuntu too ^^”

It would be great if you can answer me :D

[…] running Windows apps in Linux with Wine, or take a look at how to install Google Chrome in Ubuntu. Safari 4 on linux with WINE: solved […]

Dan Kegel says:

Sorry about the outdated Flash sha1sum.
I uploaded an updated winetricks yesterday or so,
the “modify winetricks” step should no longer be needed.

admin says:

@Dan Kegel, thanks for that will amend accordingly
@ammii, probably best off to post at and ask for an answer there. Make sure to say what version of Wine you’re using. I’m assuming it installed OK?

[…] Sendo assim, já providenciei a instalação no meu Ubuntu, confira a solução (em inglês):  Safari 4 beta no Linux com Wine. Leia tambémA Cabeça de Steve Jobs (0)Acesse o VIVO OnLine com Avoi, um complemento […]

yv says:

Oh… to see the tabs, fire up winecfg, go to the graphics tab, and uncheck the “allow window manager to decorate windows” option. Wine then handles the windows chrome, and hey presto, the tabs appear as expected.

On the downside, I’m finding that HTTPS doesn’t work, which is a real bummer.

admin says:

thanks for that, I still don’t get the top tabs but it seems a little more robust this way

[…] See also posts on getting Safari 4 running on Linux and on fixing running with Safari 4 with WINE. […]

Kevin Vranken says:

Would just like to add that typing iphlpapi.dll in winecfg wouldn’t work, iphlpapi (without the .dll) did however

admin says:

Thanks Kevin, I think I tried both, certainly without the .dll works.

[…] Safari 4 on linux with WINE: solved | flapjacktastic Winetricks (tags: linux wine safari) […]

[…] Safari 4 on linux with WINE: solved | flapjacktastic Winetricks (tags: linux wine safari) […]

hydraconsole says:

I was able to install safari but unable to browse secured sites like logging into Yahoo! Mail, Gmail, facebook, and other sites with https://

[…] flapjacktastic trình bày một cách chi tiết cách cài đặt Safari 4 lên hệ điều hành Kubuntu 8.10 […]

[…] on from installing Safari 4 on Linux/Ubuntu here’s how to do things for Safari 5.1. If you have problems then check back there for steps, […]


Flapjacktastic is just a random collection of musings, hints&tips, notes, information ... a collection of stuff really that's overflowed from the brain of this husband, father, potter, business-man, geek ...

past posts