Archive for August 2010

Life = Art

25 August 2010

I’ve been accused of living in a cartoon world and I’ve drawn stick people.

On XKCD I find stick people living my life!

xkcd steal_this_comic

Of course in real life I’m pretty anti-pirate. It seems obvious one should not freely take something that is not freely offered. However, when I BUY something …. Demand DRM-free files!

Reading my Ebook

14 August 2010

oil-painting-Tete-De-Femme-by-Spanish-Painter-Pablo-PicassoI’ve made some progress reading my test-case ebook. Copied the freed file to my Mandriva netbook to read in spare moments using FBReader. Won’t go so far as to do a book review, at least not yet. But will share one quote…

In fact, in the first three months of life, a baby’s visual ability to recognize faces is greater than at any other time in its life. An infant can recognize a jumbled photograph of her mother as quickly as an intact photograph—older children are not as adept at this exercise.

Interesting. Might this explain Picasso?

Canadian DMCA (Bill C-32) and ‘my life of crime; part 2’

8 August 2010

No reading!I love the idea of ebooks for much of what I read. Compare the distribution of a downloadable ebook to the materials, energy and pollution required to print and distribute a paper book. Sadly, every time I’ve looked at the ebook landscape it looks like a mess of digital rights management (DRM).

I have downloaded a few free books in pdf format and purchased two, After The Software Wars by Keith Curtis and the Canadian Electrical Code from the Canadian Standards Association. I read these usually on my Nokia N800 PDA and sometimes on other computers.

On CBC radio I heard an interview with Jeremy Rifkin promoting his new book The Empathic Civilization: The Race to Global Consciousness in a World in Crisis. The interview was interesting enough, I thought I might like to read the book. I didn’t want to buy a paper book though, so looked online. Perhaps this would be a personal test case for ebook reading.

Online I found the book in formats for this or that reader, but I don’t own this or that reader and don’t expect to any time soon. I found a website where the book could be read online, but I’d rather be able to read off-line too. I found the book in epub format. And yes, there is epub reader software I could install on the laptop I was on at the time.

I installed Calibre (apt-get install calibre) based on a review I read that said it could handle epub documents from a variety of sources. Then I discovered that the U.S. Penguin site (no relation to Tux) I had come to from a Google search apparently would not sell to addresses outside of the U.S. didn’t seem to have the book. I thought of putting a U.S. address into the U.S. Penguin site, after all I was downloading so didn’t need them to mail anything to me. But then I thought that a Canadian credit card might not work there.

Some more searching lead me to Chapter’s/Indigo’s Kobo site where the book was available in epub format. Yeah! So I signed up to the site and paid my money and downloaded … an urllink.acsm file. What’s an urllink.acsm file? That’s not what I thought I bought.

Well, it seems an urllink.acsm file is a file that has to be opened with Adobe Digital Editions (ADE) software. ADE will then download the book for me. ADE is an engaging way to view and manage my eBooks according to Adobe. OK.

Unfortunately the system requirements for ADE are Windows or Mac. I don’t have Windows or Mac. So, I installed Wine (software that allows running Windows software on other platforms). Found a link to download ADE and installed it with Wine, then ran ADE in Wine.

ADE said I could set it up to work with books only on that machine, or I could use an Adobe ID to register other machines that I might want to read books on. I don’t want to register my machines with Adobe. What business of theirs is it what machines I have? So I chose the option to use only the machine I was on. Couldn’t find a way to open the urllink.acsm file with ADE, so I tried dragging and dropping the acsm into ADE and that worked.

So, now I had the book I had paid for but I could only read it using ADE in Wine on my wife’s laptop! This was not what I had in mind at all when I bought the book. There had to be a way around this. Googley, Googley, Googley (imagine clock hands whirling round and round, or digits in a blur if you prefer digital). All I could find that might free my book was a pair of python scripts that work in Windows (ineptepub.pyw and ineptkey.pyw). Weird that there doesn’t seem to be anything the works on Linux.

Anyway, I downloaded the python scripts and had a look at the code. The scripts seem to get some kind of key from the Windows registry and use that to decrypt the epub and save a freed version. I thought I could figure out what the scripts do and maybe go through Wine’s fake Windows registry…. As I considered that another mind-thread was working out the WAF (wife acceptance factor) on the time it would take me to do that. WAF plummeted into the negatives and greatly outweighted the benefit of reading my book on other devices.

Maybe the scripts would work in Wine!? But how to do that? I went to and downloaded a Windows version of Python. Installed it in Wine. Now what? Running “wine python script_1” won’t work. I could run “wine python” to get an interactive python shell, but how do I launch the script from there? There’s probably a way, but I don’t know it off the top of my head. Then I remembered that Windows has some sort of command shell. What was the command to launch it? Aha! “wine cmd” Ok, so I had a “Windows” shell. There I typed “python script_1” and received the expected — well, maybe expected is too strong a word — the hoped for response. Ran the second script the same way and voila! At last I had a deDRMed epub version of my book.

The final steps were to install an ebook reader (FBReader) and copy the deDRMed epub onto my N800. At last I can read my book when and where I want on my pocket sized N800.


The ebook landscape is still a minefield of DRM B.S. I am left annoyed enough that I likely won’t buy another book for a good long while.

I can probably expect guys in ERT outfits to come crashing through the skylight some evening soon to rendition me off to Syria or some such place for torture. They may be slowed a bit by the fact that I don’t have a skylight, but the fact remains (if I am not mistaken) that breaking DRM is illegal in Canada. Certainly the recent Bill C-32 section 29(1)(c) states that it is not an infringement of copyright to make a copy of a work if “the individual, in order to make the reproduction, did not circumvent, as defined in section 41, a technological protection measure, as defined in that section, or cause one to be circumvented;”

I had to circumvent a technological protection measure to be able to read my book outside of a particular piece of software that I can only run within a Windows compatibility layer on my wife’s laptop. While this appears to be against the law, I cannot find it in my conscience to feel that I did anything wrong.

Imagine a book store. A customer has paid for a book and the cashier has taken the book behind the counter and put it in a bag.

Cashier: “What chair do you intend to read this book in?”

Customer: “Pardon?”

Cashier: “What chair do you intend to read this book in? You can read this book only in one chair and it has to have Adobe cushions which are available for blue chairs or white chairs. You can get the Adobe cushion for free. If you want to read the book in more than one chair you have to register your chairs with Adobe.”

Customer: “Well, um. I like to read in bed sometimes and sometimes … um I only have brown chairs.”

Cashier: “Adobe cushions are not available for brown chairs.”

Customer: “Look, I don’t want to register my chairs with anybody, nor do I want to buy a blue chair or a white chair and I don’t really want an Adobe cushion. I just want to read the book I paid for!”

Cashier: “No.”

Customer leaves for a while, then returns.

Customer: “Look, I have a white chair and put an Adobe cushion on it. May I have my book?” (the customer hopes the cashier won’t notice that the white chair is really a brown chair with a white throw over it! The Adobe cushion seems to fit OK.)

Cashier: “Alright, but if you read the book in bed, or in some other chair you are a criminal!”

Customer thinks this whole system is crazy and that evening wonders where his new life of crime will lead as he reads the book in bed. He is comforted by words of Mahatma Gandhi “Non-cooperation with injustice is a sacred duty.”

My wife doesn’t want me to blog about this experience because she worries about me being renditioned off to some strange land for outsourced torturing, or even some lesser penalty that we can’t afford. I blog anyway though because I think there is an important point to be made here. Am I wrong to read my book on my N800? Does Adobe have some right to make me register my computers? Does this DRM business belong in Alice’s Wonderland? I hope some day I can buy ebooks without running into moral dilemmas.

Afterthought: If Bill C-32 negates any user rights in the presence of a technological protection measure, then the consumer is at the mercy of the software licence agreement provided with whatever software is required to read a particular ebook. In a case like mine, the user is not presented with that information or the software licence agreement text until after money has been paid. The Adobe Digital Editions licence agreement looked alright, but I have seen some licence agreements over the years that I would certainly not want to click “accept” for. This seems to me to be a wide open avenue for abuse of consumers along the lines of the Sony rootkit fiasco.

DMCA and my life of crime; part 1

8 August 2010

I printed a page off the BC Safety Authority website that showed details of inspections on a permit on a customer’s job. Customer wants copies of relevant paperwork. Using ‘print to file’ the web page produced a postscript file. I don’t think most people can readily read a postscript file so I tried to convert it to PDF. My ps2pdf gave an error about the file being produced from an encrypted PDF and so cannot be ‘redistilled’ whatever that means. I’m not trying to make ethanol (yet), I’m trying to make a PDF! So I opened the file in an application and tried to print to PDF. Same error! What the heck?!

So I had a look at the postscript and found a line that read “Removing the following eleven lines is illegal, subject to the Digital Copyright Act of 1998” followed by a bunch of lines (11 I suppose) of weirdly encoded stuff that apparently was telling programs that the file could not be made into a PDF. Why would someone do that? Anyway, it’s my permit and my customer and the customer’s house and the file is on my computer. I can view the file, could send a postscript version, can print and mail a paper copy. There are no privacy or copyright issues here and the Digital Copyright Act of 1998 is a U.S. law so pee on that nonsense! I deleted the lines and the file converted to PDF with no further troubles.

Unfortunately I suppose this means that in the U.S. I’m some sort of criminal now so dare not cross the line even if I did have a passport. What a loopy world we live in.

Update: Under legislation making it’s way through the House of Commmons this month (September 2011) my making a PDF of this file to email to my customer might be an illegal act in Canada too. The code that prevented the file from being printed as PDF would, I think, qualify as a digital lock. So I suppose in future I’ll have to mail customers a paper copy or break the law! I’m sure this law makes sense somehow….

Free Audiobooks!

5 August 2010

The oggs I was downloading prior to my post “wget goes blind?” were from LibriVox. LibriVox’s objective is “To make all books in the public domain available, for free, in audio format on the internet.”

I went to their catalogue and entered a word of a topic I was interested in into the “Title” field of the catologue search. Once my puzzle with wget was solved I wound up with just over 400 Mb of ogg files to listen to!

LibriVox looks like another reason to love the Internet!

wget goes blind?

5 August 2010

robot image courtesy of Dirty Bunny to download a bunch of ogg files from a server directory containing lots of other things and NOT wanting to download one by one, I turned to wget.

Seemed to remember something about wildcards not working with wget in what I would think of as an intuitive way, so I googled wget and wildcards. Soon found reference to the use of an “-A” option that looked like it would do the trick.

wget -r -l1 --no-parent -A.ogg http://domain/directory/subdirectory/

and got a copy of the directory tree and an index html file that was removed again immediately by wget “since it should be rejected”. What the heck? Where are the oggs?

Had a look at the subdirectory using lynx and got a directory listing with various files including the ogg files. The files seemed to really be there, no sign of a base address or other magic that might be making the files look like they were where they were not. Lynx could see them. Had wget gone blind?

Read (ok, skimmed) the man page, tried playing with the options a bit,. Same result. There was an http 302 redirect involved so I tried various options with the domain that the redirect was to. No joy.

By this time I could have just downloaded the files one by one! Have to solve the mystery though. Why can’t I wget these oggs!?

Finally, and looking at bash history gives me no clue what made the difference, one of my attempts gave output that included “Loading robots.txt; please ignore errors.”

Robots.txt! What does this robots.txt say?

User-agent: *
Disallow: /

That robots.txt disallows robots from visiting all pages, and of course wget’s going to play nice. So one more Google for wget and robots.txt and at last the answer!

wget -r -l1 --no-parent -A.ogg -e robots=off http://domain/directory/subdirectory/

and I got the oggs. Happy day.

btw: the wget man page does mention under the description that wget respects the Robot Exclusion Standard. I missed that. Rarely look at the descriptions. There is no mention in the man page of a robots command and I hadn’t thought to look at /etc/wgetrc. After finding the answer I needed on Google I looked for where the robots command might be documented on my system. I finally found it in the info file under Wgetrc Commands with some explanation in the appendices.

Also, it turned out that wget did need to be aimed at the domain that the http redirect directed to. I don’t know whether that may have been because of the use of the -l1 option. Didn’t play around with that for fear of downloading the entire internet. So much to learn. So little time.

robot image courtesy of Dirty Bunny