Install Tabulate without iTunes on Linux

Tabulate will allow you to open links in new windows when browsing websites
on your iPhone.

It normally is installed by adding a bookmark on your Mac/PC and syncing your iPhone with that.

This post will show you how to install it on Linux without using iTunes.

Download the Safary Bookmark file from your iphone.
For firmware 1.1.3 this is in /private/var/mobile/Library/Safari/Bookmarks.plist

Use plutil to convert the binary playlist file to text
so you can modify it:

perl plutil.pl Bookmarks.plist

You’ll find a file named Bookmarks.text.plist

in which you can a new entry for Tabulate:

<dict>
    <key>URIDictionary</key>
    <dict>
        <key>title</key>

        <string>Tabulate - bring open in new tab to iphone</string>
    </dict>
    <key>URLString</key>
    <string>javascript:(function(){head=document.getElementsByTagName('head')[0];if(head){s=document.createElement('script');s.setAttribute('src','http://gadgets.inventivelabs.com.au/tabulate/script');head.appendChild(s);}else{alert('Tabulate-error:document-invalid');}})()</string>

    <key>WebBookmarkType</key>
    <string>WebBookmarkTypeLeaf</string>
    <key>WebBookmarkUUID</key>
    <string>78B2DD0B-3978-4773-8ED0-419027E79BD6</string>

</dict>

All you need to do is to convert your text file to binary, rename it and copy
it back to your iPhone again:

perl plutil.pl Bookmarks.text.plist
mv Bookmarks.binary.plist Bookmarks.plist
scp Bookmarks.plist root@iphone/private/var/mobile/Library/Safari/

To make Safari use the new Bookmarks reboot it by pressing the home button for about 5 seconds.