Calibre on linux tech support
Jul. 10th, 2019 09:01 pmI mentioned on tumblr that I'd gotten REAL FUCKING STUBBORN and spent 3 hours figuring out how to make the deDRM plugin for Calibre on linux work with stuff from Adobe Digital Editions. And
sciatrix asked for the full how-to, which was good, because I'd written down just enough to remember where in my search history to go to reconstruct the details, but not enough that I'd actually have been able to repeat the process easily in 6 months or whatever when something inevitably breaks and I have to do it again.
So I'm putting the step-by-step instructions here for anyone else who wants it and also so I can find it again later.
How to use the de-DRM plugin for Calibre on linux with Adobe Digital Editions:
I think this is what eventually worked for me (on Ubuntu 18.04 LTS, normal Calibre and deDRM plugin install)
Step 0: get wine and winetricks - sudo apt install wine-stable winetricks (or something like this)
Step 1: install ADE in wine (instructions from here):
- create a new clean win32 wine prefix:
WINEPREFIX=“$HOME/.wineADE” WINEARCH=win32 wine wineboot - install some extra packages:
WINEPREFIX=“$HOME/.wineADE” winetricks corefonts dotnet40 - Download ADE 4.5.0 – the latest 4.5.9 version refuses to install with “Adobe Digital Editions is already running :) :) :)” (which is infuriating) but you can get the 4.5.0 installer here
- Install ADE:
WINEPREFIX=“$HOME/.wineADE” wine ADE_4.5_Installer.exe - (optional, i don’t think i did this) fix graphics glitches: WINEPREFIX=“$HOME/.wineADE” winetricks ddr=gdi
Step 2: install a 32-bit version of python 2.7 WITHIN THAT WINE PREFIX:
- download x86 python installer from python.org
- install python into wine:
WINEPREFIX=“$HOME/.wineADE/” msiexec /i python-2.7.8.msi - install pycrypto tools from here (I think it’s this one )
WINEPREFIX=“$HOME/.wineADE/” wine pycrypto[…versionstuff].exe
Step 3: Authorize ADE and download your stupid book
- Open ADE and sign in with your Adobe ID
- Open the .ascm or whatever ADE-format file you got, this downloads the actual pdf/epub
- Close ADE
Step 4: generate a key thingy and put it in Calibre
- The deDRM tools zipfile has an “other tools” folder with a bunch of scripts, one of which generates the key file you need. run that script from your wine directory, e.g.:
~/.wineADE/drive_c/Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions$ wine python adobekey.pyw - This will create a file in that directory that’s something like adobekey_1.der. Put that somewhere less awkward if you want.
- Open Calibre preferences, go to the deDRM tools (under file types) and “customize plugins”, then click on the button for Adobe Digital Editions
- You’ll get a window with a place for your WINEPREFIX path, and a place to load the keyfile, at which point you go find the adobekey_1.der file and put it there.
And now you should be able to add the ADE-downloaded PDF to Calibre and it will strip the DRM like with other formats.
Notes: - there's probably ways to avoid putting the WINEPREFIX= bit in every time but whatever - I am relatively new to linux so I probably can't answer a lot of questions but I can try - Adobe can get fucked with a chainsaw for making this so goddamn difficult
ETA: I fucked up my wine prefix and then I couldn't get ADE 4.5 to work, but this guy's instructions for ADE 2.0 seem to work
no subject
Date: 2019-07-11 02:08 am (UTC)export WINEPREFIX=$HOME/.wineADE
If you want to then check that it's been set correctly,
echo $WINEPREFIX
(Note the presence and absence of dollar signs; this is very important in bash and very counterintuitive if you're used to certain other languages.)
Welcome to Linux! Always good to see a fellow user out there. (DeDRM wasn't too bad for me; getting Kindle to work with Wine was hell and depended on a very specific, very old version of Kindle--thanks, Amazon; haven't tried ADE.)
no subject
Date: 2019-07-11 02:35 am (UTC)no subject
Date: 2019-07-11 08:38 pm (UTC)no subject
Date: 2019-07-22 07:48 pm (UTC)no subject
Date: 2019-08-09 03:56 pm (UTC)(if you need something in particular, let me know and i can check the UMD library and maybe grab it for you)
no subject
Date: 2019-07-11 08:36 pm (UTC)And yeah, this is 100% an Adobe problem and not a Calibre/deDRM problem, except in that there's no actual documentation for the whole process because of course not
my mac laptop is now functionally a desktop, and i cannot fucking even with either the cost of a new mac or the ...everything of windows, so my new actually-a-laptop is now running linux and it's working well for me so far :)
no subject
Date: 2019-07-11 10:18 am (UTC)no subject
Date: 2019-12-26 03:47 pm (UTC)I needed to install some additional packages (libfaudio0, winbind; wine-gecko and wine-mono from WineHQ); because I have Never Really Used Wine Before I also spent some time working out (1) how to launch ADE (WINEPREFIX, then burrow down through all the layers of obfuscation to launch DigitalEditions.exe) and (2) where it had put my files, but -- BOOK DOWNLOADED & CONVERTED, thank you! :D