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

load_flash() {
# www.adobe.com/products/flashplayer/

# Active X plugin
# http://blogs.adobe.com/psirt/2008/03/preparing_for_april_flash_play.html
# http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_active_x.msi
# 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]

2ce71dc5b2e9c10692caaead2b77276103e745f3  iphlpapi.zip
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"

1 | Safari 4 on linux - download now | flapjacktastic

February 27th, 2009 at 3:22 am

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

2 | McColley.net » Blog Archive » Run Safari 4 Beta on Linux with Wine [Safari]

February 27th, 2009 at 9:32 pm

[...] 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 [...]

4 | Safari 4 Beta đã có thể chạy trên Linux - ...:::Dien dan Quang Nam Online:::...

February 28th, 2009 at 1:55 pm

[...] 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 [...]

5 | David Gerard

February 28th, 2009 at 3:40 pm

The main bug for this is http://bugs.winehq.org/show_bug.cgi?id=14574 – it appears work is in progress on it, so a lot of this won’t be as necessary soon, we can hope!

6 | ammii

February 28th, 2009 at 4:42 pm

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

7 | Run Safari 4 Beta on Linux with Wine [Safari] - 70th Edition | Technology Revealed

February 28th, 2009 at 6:35 pm

[...] 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 [...]

8 | Dan Kegel

March 1st, 2009 at 7:56 am

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

9 | admin

March 1st, 2009 at 11:21 pm

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

10 | Diogo Santos » Safari 4 beta no Linux

March 2nd, 2009 at 6:40 pm

[...] 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 [...]

11 | yv

March 18th, 2009 at 12:39 pm

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.

12 | admin

March 19th, 2009 at 3:02 am

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

13 | Safari 4 on Linux: tabs fix | flapjacktastic

March 20th, 2009 at 3:11 pm

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

14 | Kevin Vranken

March 31st, 2009 at 5:56 pm

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

15 | admin

March 31st, 2009 at 9:44 pm

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

16 | Webhamer Weblog: Search & ICT-related blogging » links for 2009-04-22

April 22nd, 2009 at 10:02 pm

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

17 | StauthamerNet :: Staut’s Family Blog» Blog Archive » links for 2009-04-22

April 22nd, 2009 at 11:04 pm

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

18 | hydraconsole

June 11th, 2009 at 2:03 pm

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

19 | Safari 4 Beta đã có thể chạy trên Linux « Talk about Open Source

January 23rd, 2010 at 9:50 am

[...] 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 [...]

20 | Install Safari 5.1 on Linux | flapjacktastic

September 26th, 2011 at 3:24 pm

[...] 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, [...]


About

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