A slightly involved fix to partially enable tabs in the Safari 4 beta over WINE on Linux. Other options are exposed and can be altered too, eg turning off Google suggest.
See also posts on getting Safari 4 running on Linux and on fixing running with Safari 4 with WINE.
On a scale of 1-10 for putting off newbies this one is probably an 8. If you’ve used the command line at all then you’ll be more than fine. Here’s what we have to do:
It’s not going to be pretty but it does give you tabs (and they’re only slightly buggy).
1. Apple uses plist files to store configuration inforamtion, like an rc file (eg bashrc
) or the MS Windows registry. For Safari 4 on windows XP the file we need is apparently stored at C:\Documents and Settings\<Your Username>\Application Data\Apple Computer\Preferences
(thanks to justin for that one). In my wine installationn however the files are at ~/.wine/drive_c/windows/profiles/pandfi/Application Data/Apple Computer/Preferences
. We’re looking for com.apple.Safari.plist
.
2, 3. The perl script plutil.pl from Starlight Computer Wizadry sorts us out here. Download it (you may have to run chmod u+x plutil.pl to enable it to be executed) and run it on that plist file we found:
$ perl ~/Applications/plutil.pl ./com.apple.Safari.plist
This gives us a new file calle com.apple.Safari.text.plist, open that with your favourite text editor (I use kate) and simply add the required options (see section below), alterations are highlighted:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>AllowSiteSpecificHacks</key>
<true/>
<key>CommandClickMakesTabs</key>
<true/>
<key>ConfirmClosingMultiplePages</key>
<true/>
<key>ConvertedNewWindowBehaviorForTopSites</key>
<true/>
<key>DebugSafari4TabBarIsOnTop</key>
<false/>
<key>HistoryAgeInDaysLimit</key>
<integer>31</integer>
This change, not surprisingly will turn off the feature where the tab bar is on top. As it’s a debug feature I wouldn’t be surprised if this option doesn’t make it in to the final release. We’re certainly not guarranteed the final release will be as WINE friendly as this beta.
The following debug options were suggested by Caius by analysing strings found in the Mac Safari binaries, they can be added to the plist file in the same way a the above DebugSafari4TabBarIsOnTop option was.
$ strings /Applications/Safari.app/Contents/MacOS/Safari | grep DebugSafari4
DebugSafari4TabBarIsOnTop
DebugSafari4IncludeToolbarRedesign
DebugSafari4IncludeFancyURLCompletionList
DebugSafari4IncludeGoogleSuggest
DebugSafari4LoadProgressStyle
DebugSafari4IncludeFlowViewInBookmarksView
DebugSafari4TopSitesZoomToPageAnimationDimsSnapshot
DebugSafari4IncludeTopSites
4. Lastly we need to use the plutil.pl script to convert our text file back to a binary, then rename the resulting file.
$ perl ~/Applications/plutil.pl ./com.apple.Safari.text.plist
$mv perl ./com.apple.Safari.text.plist ./com.apple.Safari.plist
Quick tip mv perl ./com.apple.Safari{.text,}.plist is equivalent to that last line, the curly braces {} simply say use the first string for the first option and replace it with the second string (empty string here) for the second option.
That’s it, you’re done, run Safari 4 beta with wine and see how it looks. Not pretty for me (see image at top of post), quite buggy but tabs nonetheless.
Sorry, comments are closed.