DRM is a shorthand for the evil practice of Device Rights Management (or Device Restriction Management), where venders of digital stuff (particularly books and music) claim you did not buy their product, but only a revocable license to use it, and they encrypt what is downloaded to your computer or device to keep you from sharing the book or whatever with your friends, neighbors, relatives, or whoever. They also reserve the right to delete the book from your device at their discretion, and without refunding your money.
Agreed, sharing in this manner is a violation of copyright, and the publishers are within their rights to enforce this. HOWEVER, making backup copies for your own use or having the item on multiple devices that you own is LEGAL, but as long as the DRM is there you cannot do so.
Just one example of why you want to remove DRM from any downloaded
book: What if you drop your Kindle or have it stolen? The
unrestricted versions of your books on your hard drive would still
readable on most e-book reader programs, for example the
ebook-viewer utility that comes with Calibre.
Therefore, here is how to legally remove the DRM for your own private use. (If you break the DRM and then put the book on your web page or share it around, you are guilty of a felony and you will get no sympathy from me or the judge.)
tools_v5.5.3. Park that directory wherever it’s convenient. I put it in
Other_Tools, which seemsreasonably obvious.
K4MobiDeDRM-v4.13_plugin.zip. Ignore the warnings.
The plugin will now remove DRM from any Kindle file being added to the Calibre library or being sent to the bookreader, but it will not change the version which is already in the Calibre database! If you want to remove DRM from a book already in the Calibre database (to read it from inside Calibre, for instance), the easiest way is to select the book(s), click on “Save to Disk”, then import them (removing the DRM in the process) and delete the originals.
The DRM removal tool can also be run from the command line.
It’s name is
k4mobidedrm.py, and there ought to be
They are identical and both will work under Linux. (Hooray for Python!) Use the Windows one, both because the path is shorter and because it doesn't contain any blanks.
tools_v5.5.3/DeDRM_Applications/Macintosh/DeDRM 5.5.3.app/Contents/Resources tools_v5.5.3/DeDRM_Applications/Windows/DeDRM_5.5.3/DeDRM_lib/lib
The command is:
I have a short batch file I call undrm that makes this much easier. Note we have three Kindles, and the offending file might have been originally downloaded to any of them:
python [pathto]k4mobidedrm.py -s [kindle serials, in quotes] [file to be converted] [directory to park the unDRM version]
#! /usr/bin/zsh ### Remove DRM from an AZW file, storing MOBI in home directory python ~/bin/tools_v5.5.3/DeDRM_Applications/Windows/DeDRM_5.5.3/DeDRM_lib/lib/k4mobidedrm.py -s "B006A0A00422E67FF,B006A0A0119401A7,D059A0A024450M3H" "$1" "/home/dierdorf/"
undrm whatever/mybook.azwwill produce
mybook_nodrm.mobiin my home directory.
PS: To easily update Calibre to the most recent version, I use the following small Linux batch file:
The Windows and Mac versions don't need this — you can just click on the “Update” notice when a new version is available.
#! /bin/sh # wget -O- http://status.calibre-ebook.com/dist/src | tar xvz # cd calibre* # sudo python setup.py install sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main(install_dir='/opt')"
Although I concentrated on the Kindle, note that the
CalibrePlugins directory also has plugins to remove DRM
if you have a Nook, Sony reader, or whatever, you can exorcise those
books, too. It does NOT handle Apple decryption, but the
original web page has a link to a tool which does do so.
The Kindle Fire has two “folders” where it stores and displays readable material. If it was downloaded from Amazon, it goes into “Books”, and if it was “sideloaded”, either drag-and-drop or via Calibre, it goes into “Docs”. This is a PITA, both because you’re not sure where a particular title is, and because the Docs folder can’t be sorted by Author. Here’s how to get those into “Books” instead, using Calibre.
The most common way to mount a “foreign” Linux file system on your computer is using NFS (Network File System).
nfs-commonpackages are installed. (Ubuntu doesn’t install them by default.)
sudo apt-get install nfs-common nfs-kernel-server
/etc/hosts.allowto have a line such as:
listing computers that you are willing to allow access to THIS computer. You can use either an IP address or a DNS hostname.
ALL: othercomp 192.168.0.111 dell sony ...
/etc/exportsto have lines like these for each file system you’re willing to export and the computer it can be exported to:
In this case, I’m allowing three different file systems (
/ dell(rw,sync) /extra dell(rw,sync) /images dell(rw,sync) # / sony(rw,sync) /extra sony(rw,sync) /images sony(rw,sync)
images) to be exported to computers
Note that if you are on
mycomp and want to access
othercomp, you have to change othercomp’s
/etc/exports files to
It’s easier to put entries in your /etc/fstab file:
sudo mount -t nfs othercomp:/home/dierdorf mymountpoint
dell:/home/dierdorf /dell nfs relatime,users,noauto 0 0 sony:/home/dierdorf /sony nfs relatime,users,noauto 0 0
/sonyare the mountpoints. The
noautooption means they will not be auto-mounted at boot, since they might not be available on the network at the time. When you decide you need one, just say:
or whatever. (You don’t need to use
sudobecause of that
Windows uses a facility called
SMB (Server Message
Block), now renamed
CIFS (Common Internet File System),
for network sharing. Linux has a tool called
interface with a Windows network sharing environment. Again, it
isn’t installed by default, so if you need it, use
sudo apt-get samba smb-client winbind