This might be the most hacker(hard) way to do it.
Close your ibooks app, do not open it till the end!
Extract your .epub
file in to a folder with the same name.
If the file is book1.epub
, the extracted contents should be in the folder book1.epub
.
Open the iDevice in your Ubuntu file explorer.
Navigate to Books/Purchases
copy the extracted folder here.
Open the purchases.plist
file in your text editor. It's an xml.
It should look like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Books</key>
<array>
<dict>
<key>Artist</key>
<string>Chuck</string>
<key>Inserted-By-iBooks</key>
<true/>
<key>Name</key>
<string>Fight Club</string>
<key>Package Hash</key>
<string>6744918BA88D5BF234A2B663F3A311E2</string>
<key>Page Progression Direction</key>
<string>default</string>
<key>Path</key>
<string>Fight Club_ a novel - Chuck Palahniuk.epub</string>
<key>s</key>
<string>0</string>
</dict>
<dict>
<key>Artist</key>
<string>George Orwell</string>
<key>Inserted-By-iBooks</key>
<true/>
<key>Name</key>
<string>The Complete Novels Of George Orwell</string>
<key>Package Hash</key>
<string>6744918BA88D5BF234A2B663F3A311E1</string>
<key>Page Progression Direction</key>
<string>default</string>
<key>Path</key>
<string>Complete Novels Of George Orwell, The - George Orwell.epub</string>
<key>s</key>
<string>0</string>
</dict>
</array>
</dict>
</plist>
Copy a section between with the <dict>...</dict>
tags and fill in your meta data of the book.
For the Hash just change the last two characters, so that it doesn't duplicate any other entry. Save the file and open the iBooks app.