Writing a Book with Linux
I spent the past year writing The Librarian’s Guide to Academic Research in the Cloud, a book which focuses on using and thinking about cloud services in an academic research context. I’m fortunate enough to belong to a union that negotiated research leave for new faculty, and that leave made the book possible.
The content of the book might be interesting to Linux users (here is an excerpt), but I wanted to talk about the process for writing the book, which was very Linux-intensive.
Before starting the book, I had heard a lot of horror stories about people forced to use crazy Word stylesheets and templates from publishers. I was very glad that my publisher didn’t use anything like that, which might have forced me to spend more time in Windows. I decided to work with RTF files and used LibreOffice to write the whole thing.
Working with LibreOffice as much as I did was an interesting process. At work, I use Word for word processing and at home I use gedit until I absolutely need to format something. So I hadn’t spent very much time with LibreOffice. It was fine, but there were some rough edges that made it feel a few iterations behind Word. For instance, I wasn’t able to get a running word count going, even though there’s supposed to be an extension to do that. Fonts seemed to change between opening and closing a file. And one file kept getting wiped because I had an HTML link at the start of the file. Nothing cataclysmic happened, but using LibreOffice was not as smooth as using Word. Word is crazy and convoluted, but for the most part, it’s stable and stays out of your way. LibreOffice occasionally acted up and while nothing completely wrecked my project, I don’t find myself suddenly writing in it now that I no longer need to.
Despite some of its limitations, one LibreOffice feature I love is the ability to generate a PDF of a document in one click. I had to deal with permissions, so I just created a permission template that let me easily turn permissions forms into PDFs, which I then emailed out. This was much easier in LibreOffice than it would have been in Word, where I would have needed to convert the files to PDFs using Save As, or that weird Adobe button that takes forever to export the PDF. The Gmail canned message option (available in Labs) was also very helpful when it came time to send out the permissions. The whole permissions process required very little typing, which is always nice.
I’ve recently heard good things about XMLmind, which is used, among other things, to generate DocBook. It’s something I want to further explore for long-form writing. And I’m also curious to see if pandoc, recently mentioned by Bryan Behrenshausen, might be a good option for me.
In terms of images, I did as much as I could with GIMP and the default GNOME Screenshot tool and that was super simple. I know some people hate GIMP, but once you get used to it (and it took me quite a while to get used to it), it’s powerful and effective. I don’t know if I’ll ever find it easy to use, but it can be conquered.
I was terrified of losing work, so I used SpiderOak as my main backup tool, but then also manually uploaded files into Dropbox every time they were updated. One of the things I like about SpiderOak is that it can be configured to run on demand, only backing up files when I ask it to. That keeps my machine running pretty quickly, where I find the Dropbox client often slows things down. Uploading files into the web interface was painless, though.
I tried to focus the book on cross-platform tools as much as I could, but the reality is that there’s an awful lot of stuff that doesn’t run on Linux. For those situations, I had a virtual machine running XP (via VirtualBox) and it proved to be a life-saver in terms of testing Windows-only tools. It also turned out to be very helpful for installing software I knew I didn’t want on my Linux install. Rather than installing and uninstalling and then cleaning up files, I used the XP image as my sandbox. Toward the end of my book, I had an RTF file (my index) LibreOffice couldn’t open and WordPad on the XP partition saved my bacon, allowing me to open the document and copy-and-paste the text into something LibreOffice could edit. Even with the book completed, the XP partition has come in handy a few times. It’s a nice little safety net for those very rare times there’s something that can only be done in Windows (or when I want to quickly check something on a second machine).
My organizational system wasn’t super cohesive, but it worked for me. I used a combination of SimpleNote and Google Docs/Drive. SimpleNote was used for general notes to myself about what needed to be changed, added, or removed from each chapter (the challenge of writing a print book about web tools is that everything is constantly shifting on you). Google Docs was used for tracking the book’s glossary, plus a spreadsheet of what was going on in each chapter, in terms of the pronoun used (I alternated between he and she), the word count, and any notes that weren’t in SimpleNote. I’m now pretty into Evernote (more on that in a future post), so any future projects will probably be tracked entirely in there, but this system worked very well for me.
Having said that, I would love to see Evernote have some kind of native table feature in its web interface because I like seeing information in grids. Especially since I recently discovered Evernote’s table-formatting button.
Once the book was typeset, proofing was handled via the annotation tools within Adobe Reader. I wound up having to install the Linux version of Reader (I had no idea such a thing even existed), and while it didn’t render as well as it does on Windows, I was able to successfully input my changes without any drama. I did double-check the file on a Windows machine to make sure everything made it in, though.
Writing a more complex, long-form work using desktop Linux was remarkably simple. The tools all worked, plus I didn’t have to deal with crashes or lags. One of the central points of my book is that web-based tools free us up in terms of the operating system we can work with. OpenSUSE 12.1 and GNOME 3 made for a fantastic work environment. Linux is great for checking email and Facebook, but it’s also great for serious knowledge work, too. Anyone on the fence about a long-form project in Linux should give it a shot. I’d be shocked if they left disappointed.
The Librarian’s Guide to Academic Research in the Cloud is available from Chandos Publishing. It is also available as an e-book on Chandos Publishing Online.
The Linux Setup - TheFu, Enterprise Architect/Writer
I know about TheFu from Lifehacker, where he’s a fairly active commenter and an occasional contributor. Not only is he knowledgeable about Linux, but he shares it in a very friendly manner that’s not seen in all corners of the Linux world.
Who are you, and what do you do?
Online, I’m “TheFu” on a few websites, but not on Facebook or Twitter.
In real life, I’m a consulting enterprise architect, programmer, and sometime blogger (http://blog.jdpfu.com) living outside Atlanta, Ga, ya’ll. I’m a Managing Director for a company that builds apps and infrastructure for portable devices. The last 5 yrs or so, I’ve done lots of virtualization. Xen, VirtualBox, ESX, ESXi, KVM, and OpenVZ.
I’m also active in the local LUG, ALE, and the local Defcon IT Security Professionals group, DC404.
What distribution do you run on your main desktop/laptop?
Your readers have heard the term “The network IS the computer”, so they will understand that most of my daily use is on other machines, not the desktop I happen to be sitting behind.
However, my main laptop runs Windows7 because some clients don’t know how to deal with Linux. I run a 32-bit Ubuntu Server 10.04 LTS with LXDE loaded inside a VirtualBox VM for 95% of what I do daily. I try every new Ubuntu release, but always find those are too bloated for my needs since 8.04. Even Lubuntu has so many programs that I don’t use, it is easier to just load the server image and add a DE. I’ve been temped to drop back to FVWM more than once.
My main desktop has 64-bit Ubuntu Server 10.04 LTS with LXDE loaded. Sometimes I need dual huge monitors.
I tried Ubuntu 11.04 for a few weeks in a VM, but it wasn’t stable with or without Unity, so it was deleted. Until Unity works well inside a VM, I simply cannot consider it. I’m an LTS sorta guy anyway.
What software do you depend upon with this distribution?
Most of my daily use software runs on other machines, not the laptop. We use lots of virtualization - Xen, KVM and ESX(i) on the servers.
On the laptop, I don’t really use much software that you’d consider “desktop”. I use cron, rdiff-backup, ssh, X/Windows, xterm (yes, the real xterm), KeePassX, ClusterSSH, Task Spooler, Firefox (w/ NoScript), Thunderbird+Lightning, OpenVPN, mencoder.
I code Perl with Geany as the editor unless I forget and use vim, which happens most of the time. Git and BZR are used for DVCS. Of course, there are hundreds of other tools like wget, TkDiff, k3b, ddrescue, nginx, thin, mongrel2, ufw, fail2ban, and par2 that are used too. PerlBrew is a critical tool.
When I install a new machine, my first command on the first console or terminal I see is ‘sudo apt-get purge nano’.
What kind of hardware do you run it on?
The laptop is a Dell 1558, Core i5 with 6GB RAM, 500G 7200rpm disk, 1080p display, GigE NIC, but the virtual machine for Lubuntu gets 1.5GB of RAM and 10GB of disk in a fully, pre-allocated VDI, with a GigE virtual NIC. I need to add a little more disk storage.
Leaving lots of extra resources on the host OS means it is easy to start other distros as needed for specialized tasks. It also means that a complete backup of the VM is smaller. If this laptop dies, my daily use VM can be loaded from a backup on pretty much any other laptop and I can be productive in less than an hour.
There are a few other physical machines here running Linux for different purposes - file/print server, VPN, Zimbra, and about 15 other needs inside virtual machines. Many of the tools listed above are actually running on other machines on the network to take advantage of faster hardware and disk array storage.
What is your ideal Linux setup?
Looking into the future a little for a few of these things:
- System stability is paramount. A system should never crash, period, even after a year of hard use. Patching, including kernel patches shouldn’t require rebooting.
- No bloat or unused pre-installed apps.
- Fast enough that I don’t notice any slowdowns.
- Voice control of programs and the ability to dictate into documents.
- No nano. Vim should be the default editor.
- My personalized keyboard setup to launch about five programs from keystrokes alone. This is even quicker than voice control.
- No need for a menu or much of a GUI. Just a little status bar that becomes visible when it makes sense, by right clicking anywhere.
- ZFS included in the kernel and all distros. Boot-able.
- Dual 1920x1600 displays. I’m not a fan of wide screen monitors. What happened to all those missing vertical pixels anyway?
- WINE runs every MS-Windows program with ease, especially MS-Visio. I can dream, right?
- Plenty of RAM. That can be 128MB or 16GB. “Enough for the specific task” is key.
- Plenty of CPU for the tasks. That could be a 64-way server or a single, low power, CPU on ARM. The key is a version of Linux that isn’t crippled.
- Multiple GigE or faster Wireless NICs connected to multiple networks (internal, backup and admin). No bandwidth caps.
- 20TB usable of RAIDz2 storage plus enough storage on the network to support a year of daily backups.
- Wristwatch-sized for the CPU, RAM and disks combined. The CPU connects to external keyboard, mouse, video and audio based on proximity with complete security. Basically, my desktop is with me everywhere and peripherals are added as needed through voice commands.
Interview conducted August 7, 2011