A Cautionary Tale: Rogue Amoeba and Apple

At the OUCE people were teasing me because I kept saying “Apple is Evil”.

Now I really don’t believe in good and evil as absolute constructs, but the phrase gets my point across. If you are a casual user of Apple’s products you probably don’t care, or more likely just don’t notice, how tightly Apple is trying to control both the information you create and what you can do with it.

[Note: for those of you who point out that Apple is a fine example of capitalism, they aren’t. In functioning markets, profits like Apple’s are not sustainable because competition will arise to drive prices down, to the benefit of consumers. With the double edged sword of stupid software patent lawsuits and a hegemony on components brought about through having container ships full of cash, Apple is preventing this from happening, or at least slowing it down, but I guess that’s a topic for another rant].

Some people think that I hate the idea of paying for software. Not true, I spend a lot of money each month on software. I prefer free alternatives, but I am more than willing to purchase commercial software as long as the vendor looks out for my privacy and the software works (or better yet, I prefer spending my money supporting free software).

One company I’ve spent money with over the years is Rogue Amoeba. They write wonderful audio-focused utilities for OS X. Recently I used Audio Hijack to digitize a collection of vinyl albums and then processed them through Fission. Through their Airfoil products I could stream music to any of my devices (well, before I started using Ubuntu – I really wish someone would work to make Linux tools that can leverage Apple’s Airplay/Airtunes technology or create a free alternative). The apps were inexpensive, easy to use, and got the job done.

Yesterday on the Rogue Amoeba website, they posted the following: “Apple Has Removed Airfoil Speakers Touch From The iOS App Store”

Airfoil Speakers was a little app that allowed you to stream music from your computer to any iOS device. It had been around since 2009. No reason was given for why this application was pulled and nothing had recently changed to act as a trigger for its removal.

Rogue Amoeba isn’t some little flight by night software company. They’ve been around a long time, been very focused on OS X (even when it wasn’t cool) and are all around good guys. While they are probably somewhere down the list of Apple business partners from, say, Samsung, my guess is that they are much closer to the top than most. The fact that Apple would just yank their app with no justification shows how little Apple cares about those who develop on their platform.

Think about it – Rogue Amoeba, and thousands of other software companies – have bet the farm on being able to supply software for Apple devices. These are good companies employing smart developers who have mortgages to pay. Now, to a large extent, their livelihood is being threatened by Apple’s fickle control of its marketplaces.

The rumor is that Apple is creating a similar product in the next iOS release, and apparently the terms of service prohibit applications that duplicate Apple-provided functionality.

Control is the main point here. One reason I left Apple last summer was that I saw that company taking more and more control over what I could and could not do with the devices on which I create. I could envision some point in time where Apple would make a decision I didn’t like, and then it might be too late or too expensive for me to back away.

I could see Apple moving to standardize everything, including their personal computers, on an iOS platform. With terms that prohibit competing products to anything Apple itself creates they are stifling competition, and I could foresee a future event where their policies might arbitrarily screw me over, although I didn’t really have a concrete example.

I do now, even if it didn’t happen to me directly.

First World Problems

Just a quick post to point out two things.

The first was that I found myself seeing a lot of press about the OS X FlashBack Trojan, and I immediately tried to test my iMac … before I remembered I was on Ubuntu.

I thought that was interesting, not only because Linux tends to be safer from such things but mainly due to the fact that I totally forgot I wasn’t on OS X.

I should also note that most sites are suggesting that the easiest way for people to detect the trojan is to download and execute some code off the Internet. (sigh)

The second thing is that David Bryne has started blogging again, and he has a cautionary tale about Amazon removing Kindle content without asking permission:

It seems that, once again, Amazon has removed purchased material from our devices. I suspect Apple had a hand in this as well. Apple has consistently sabotaged their competitors’ apps and software that allow you to sync other devices with their own. Then, all of the sudden, apps that once did X and Y suddenly don’t perform those functions anymore. In most cases those apps were free—so it is hard to complain too much. Although, some of the free apps contained magazines, books and other content, like Decoded, that I purchased and though they may not have been very good, I paid for them and they were mine to keep! They came to my house and ripped pages out of my book!

As much as I’d love to have some sort of e-reader, until they stop doing stuff like this I’ll vote with my wallet.

Back to Ubuntu

Just a quick update on my #noapple efforts. Except for one lapse I’ve not been regularly using OS X since last summer. For the last several months my desktop of choice has been Gnome 3 on Debian testing (wheezy).

Due to the tight integration with the rest of the desktop and its ability to integrate well with our middleware solution (SOGo) I was using Evolution mail. I had heard it could be buggy, but for weeks I had no problems, plus I liked the fact that it was easy to play sound files in-line without launching another app (which I have to do with Thunderbird). Our Asterisk PBX sends voicemails as attachments.

But something happened after the last update and Evolution kept crashing. It was sporadic at first, but then it happened so often I’d launch it via the Gnome debugger. Surprisingly, when I did that it was stable, but after awhile it would die even in the debugger. I did a search on the error and found out that it had been reported as a bug, but it didn’t seem to have any activity on a fix.

Since I can’t live without e-mail, I needed something else. I’d seen some interesting things about Ubuntu 12.04 so I thought I might give that a shot. Of course, there must be something wrong we me, as the businessman wants something stable that just works and the geek wants the new shiny, and here I was willing to run another testing desktop.

Lucky for the businessman, the 12.04 Alpha 2 installer kept dying on me.

The reason I left 11.10 was that SOGo did not have a frontend for the version of Thunderbird that came with it. However, that has now changed, so I went back.

I missed Ubuntu.

If you have been a longtime OS X user, Ubuntu with Unity is about the closest you can get to that experience (pre-Lion of course since Lion sucks). I had everything up and running in about an hour, and over the weekend I based my other two machines and put 11.10 on them (still didn’t fix my line-in audio problem on my iMac, however).

So I’m back to drinking the Ubuntu Kool-aid, which is cool. What I love about open source is the plethora of choices.

Ubuntu's HUD

I am on the road this week (shout out to Boise) and it is the first trip I’ve taken where I’m spending almost all of my time on my Macbook Air since upgrading it to run Linux.

I’ve been pretty happy with it. Wireless works fine, and while I sometimes struggle with nvidia-settings when trying to run an external monitor, I haven’t hit anything where I had to boot back into OS X, at least for very long.

As someone who has decided to run Linux on the Desktop, I am very eager for news on the future direction of such things. I noticed today on Mark Shuttleworth’s blog that he was announcing a new feature in Ubuntu called the “Heads Up Display” (HUD).

The idea is simple – instead of a hierarchical menu have an intelligent search box that learns what you use the most, and can use “fuzzy matching” to help you get to what you want fast. Once it is considered ready for prime time, I’ll probably check it out.

However, there were a couple of things about his post that bothered me. First, he wants to add voice recognition. While that is all well and good, I must be the only person on the planet who doesn’t want to talk at his electronics. Sure, I love being able to dial my mobile phone by voice when driving, but I don’t want to have to speak “Find Nekkid Pictures of Scarlett Johansson” into my browser. I experience so many people on cellphones creating noise pollution that I don’t want to have to deal with it in other aspects of technology. While this probably won’t be the default for most devices, I am still not as excited about it as Mark seems to be.

Second, nowhere in his post did he mention Gnome 3 as an inspiration. I’ve been using the much maligned desktop for awhile now and I love it. When I need to run a program I simply drag my mouse into the upper left corner of the screen and type in the name of what I am looking for in the “Type to search” box. Now it isn’t smart or fuzzy, but it gets the job done and seems to me to be very similar to HUD.

I especially liked Mark’s comment “Instead of cluttering up the interface ALL the time, let’s clear out the chrome, and show users just what they want, when they want it.” which is very similar to what I wrote about Gnome 3: “It gets me to where I need to be, and then it gets the hell out of the way.”

As someone who doesn’t plan to leave the linux desktop, I am excited when improvements like HUD are being implemented. In the ecosystem that is open source, the great ideas will propagate, and if HUD takes off I would expect to see something similar in other offerings.

Evolution Mail and SOGo Address Book

Just a tip for anyone using Evolution mail with the SOGo Carddav address book. Sometimes I launch Evolution (usually after a reboot) and I notice that there are no contacts in my Webdav calendar, Nothing I can do in configuration seems to help, and I get an error if I try to delete the address book to re-add it.

I figured out that if I stop Evolution, open a terminal and kill the:

/usr/lib/evolution/e-addressbook-factory

process, my contacts will reload properly. Might be some sort of race condition but I figured I’d mention it here in case someone else hits the same problem.

Oh, this is on an up to date Debian Wheezy install running Gnome 3.

Using ddclient for DynDNS Updating

Just a quick note on my #noapple efforts. I am now running Debian wheezy with Gnome 3 on all three of my main machines.

Since I have a dynamic IP address at the house, I use DynDNS to maintain a DNS record that changes when my IP does. In order to update that automatically I used to use a tool downloaded from their website, but I found that ddclient does the job on Debian.

I tried ez-ipupdate as well but it seemed to want to monitor the physical address of an interface on the machine itself, and I have a router between my home network and the Internet. ddclient was able to pick that up automatically.

#noapple – or There and Back Again

Okay, so back in the summer I decided to attempt to wean myself from Apple and to migrate to a Linux desktop. This is a much overdue post on how that went and how it is going. The TL;DR version is that I used Ubuntu 11.04 (Naughty Nightnurse) and liked it okay, then was excited to upgrade to 11.10 (Onanistic Oedipus) only to be somewhat disappointed with many of the changes. So I tried out Kubuntu, got frustrated and ran screaming back to Apple. I upgraded to Lion, realized that Lion really, truly sucks – sucks enough to make me rethink my decision to switch back. Then I find out that Debian testing (wheezy) now supports Gnome 3, so I loaded it up and I am extremely happy with it (and I’ve downgraded all of my Lion partitions back to Snow Leopard).

Okay, first some background. I use three main systems: a Desktop at the office (a 24-inch iMac (iMac9,1 to be exact) and an identical iMac at home (I bought them both, cheap, from B&H in New York). When I travel I take a second generation Macbook Air (Macbook3,1). The key to being able to use three different machines is that most of what I do is centralized on servers that I maintain. I am e-mail centric, and IMAP makes it really easy to access the same information on all three machines.

In order to start this migration, I needed some more IMAP-like services for things such as Calendar and Contacts. I found a solution in the SOGo project, which I talked about earlier. I’m still a big fan of it after several months.

Now, when it comes to Linux Desktop operating systems, there are basically two main choices: Fedora and Ubuntu. Since I was “gettin’ my freetard on” I would have preferred Debian, but they tend to lag a bit when it comes to new and shiny. Since Red Hat is headquartered nearby and I know a lot of the Fedora folks, I started out there.

Now, back in 2001 when I first started playing with Linux desktops, I was much more of a fan of KDE than Gnome, so I loaded up the KDE spin of Fedora 15. Now the biggest hurdle with getting Linux installed on Mac hardware is that for the last few years the graphics card of choice has been NVIDIA, and until recently open source support on NVIDIA was lacking. I found out in short order that the kernel option “nomodeset” is your friend in such situations. With it, I was able to get Fedora to boot enough to add the RPMFusion repos so I could load in the proprietary drivers.

Things went well for a couple of days until Fedora released a kernel upgrade, which broke my drivers, and RPMFusion didn’t have updated packages available. This lasted several days and made me frustrated enough to try out Ubuntu.

So I loaded up Ubuntu 11.04 with its fancy Unity interface. Again, I had to use the “nomodeset” kernel option to get it to load initially, but Ubuntu makes it extremely easy to add proprietary drivers. Like it is advertised, Ubuntu really tries to take the Linux desktop to the masses.

I should note here that both Fedora and Ubuntu (or more specifically, KDE and Unity) are downright beautiful. Compared to the Linux desktops I remember, they are gorgeous, and I believe they give both OS X and Windows 7 a run for their money.

I liked Unity, but wasn’t in love with it. There are still a number of issues (sometimes I launch programs that don’t show up in the Launcher) and it is plain that they are trying to emulate to some extent the OS X dock.

After using Ubuntu for several weeks, I noticed that my now aging iMac was a little slow. So when woot.com offered up a nice HP desktop for $500, I decided to buy it. The main selling point was an ATI graphics card, so I figured that it would be easier to install and run as a Linux desktop, and I wasn’t wrong. What really struck me was how much power I got for $500. If you’ve been paying the Apple tax as long as I have, you don’t realize how expensive their gear really is. Now, don’t get me wrong, I love the design and weight of my Macbook Air, but for desktops I’m not so sure the value is there.

Anyway, it was easy to migrate to the new system, and I was relatively happy until Ubuntu 11.10 was released. If you’ll remember, this was about the same time as the iPhone 4S was announced, and I could have cared less about that. With Ubuntu I was very excited, since I had become something of an Ubuntu fanboy, but I found 11.10 to be a disappointment.

They made a number of changes that impacted me negatively. First, Thunderbird, which worked well against SOGo in 11.04, was upgraded to version 7 on Mozilla’s questionable rapid release cycle. Unfortunately, SOGo isn’t able to keep its connector updated with so many releases and I lost my Address Book integration (Thunderbird doesn’t support CardDav and doesn’t appear to have plans to do so in the future). I also get frustrated with Ubuntu’s decisions to switch default apps somewhat willy-nilly. First it is Rhythmbox, then Banshee, and now apparently in 12.04 it will be Rhythmbox again.

For mail I tried to switch to Evolution, but for some reason I wasn’t able to get it to talk to SOGo either (that was probably an error on my end instead of Ubuntu, however). I was also surprised that they eliminated the screensaver, but I found out later that it was more a change to gnome-screensaver versus a decision by Ubuntu. Still, if you want to own the desktop market, a little stability is in order (and may arrive with the longterm release 12.04, Porky Paedophile).

In a fit of pique I decided to base the box and run Kubuntu. I always liked KDE and I figured that perhaps with the backing of Ubuntu for things like proprietary drivers, that would work for me.

So I set up Kmail, and Kontact and all that other good stuff (KDE has a specific option to connect to SOGo). I was a little shocked by how ugly Kontact was – they add these huge 800×800 pixel QR codes while not inheriting the system font size so the information you actually need is often hard to read, but overall the desktop was decent. If you like customizing your options to death, then this is the desktop for you.

However, I was frustrated by a number of little things. KDE kept complaining that it couldn’t connect to SOGo with these little, growl-like pop-up messages and I could not for the life of me figure out how to turn them off nor could I discover a log file that might help me diagnose the problem. All these things started to add up, but the straw that broke the camel’s back was a two hour stretch where I could not get a WebEx session with a client to work. This was impacting my productivity too much and I was so frustrated that I went and grabbed my old iMac out of the training room and resumed being an OS X desktop user.

Since I had decided that my experiment was a failure, I figured that if I was going to suck at the Apple teat I might as well go all in. I downloaded Lion and upgraded my systems, and sat back, a bit resigned, but knowing that my productivity was once again safe.

That was until I discovered that OS X Lion sucks.

I’m serious – I’ve been extremely happy with every release from Jaguar on (I missed Puma), but this one is just horrible. In Apple’s attempt to reduce the amount of thinking the user had to do, they’ve gone a bit overboard. Mail.app – my main application – seemed buggy and almost kludgy (I hate the way it defaults to threaded, or “conversation” view”). Since Apple wants to know all about your communications, they don’t add a way to encrypt your e-mail with GPG, or even a decent API. The folks over at GPGTools have responded by stripping almost every useful option out of their Lion release, which meant that I was constantly being prompted for my GPG key. Apple seems to insist on restoring every single session, application and tab once you close (or shut down) and to relaunch them with no visible method for disabling that behavior. Gone is the “Save As” function, now replaced by “Save a version” or “Export” in many programs, and be careful if you touch a file that hasn’t been accessed in awhile – it will be “locked” until you click a button in a dialog box. Sheesh – and they had the gall to knock Windows for having too many security pop ups – I touch numerous older files every hour and this gets annoying, fast.

And let’s not start in on the Address Book or Calendar. What’s with the vomit yellow-tan faux leather? The old apps were clean and sparse – making it easy to find what you need. Who actually uses a wall calendar anymore, much less needs to reminisce about flipping a page over to access the next month? What’s next, a rotary dial on the iPhone?

What I was pleasantly surprised about was the most talked about change in Lion – the “natural scrolling” feature. It is more natural, and I grew to like it almost immediately. But hey, want it in Snow Leopard? Download “Scroll Reverser“. Want it on X? Simply add a file to your home directory and restart X:

$ cat .Xmodmap
pointer = 1 2 3 5 4 6 7 8 9 10 11 12

(note the “5” and the “4” are reversed)

So now I was in a funk. A certifiable bad mood™. The Linux desktop seemed to be a dead end, most of what I loved about OS X had been taken away from me, and I wasn’t about to try Windows 7 full time. I did spent a little time with Linux Mint 12, but I didn’t like it nearly as much as Unity, and I wasn’t in love with Unity.

But then my friend Gareth Greenaway mentioned on Google+ that Debian testing (wheezy) now supported Gnome 3. I had avoided Gnome 3 because of the large amount of negative comments, especially from people like Linus Torvalds. Linus is a smart man, much smarter than me, and if he felt the need to throw that much bile at something, it must be bad.

Now, I have a soft spot for Debian. It’s the distro that doesn’t get any respect, but it is doubtful projects like Ubuntu and Linux Mint would exist without it. I love the way it just works, even though it tends to be a little long in the tooth in some areas, even on release day. I’m an old guy – I don’t need the latest shiny – I just need something that is stable and works.

So I installed Debian (see my previous post) and you know what – I’m a little pissed at Linus. Gnome 3 is awesome. Yeah – it’s different – but I think it is a little ironic that detractors claim open source doesn’t innovate when Gnome 3 is about the most innovative thing I’ve seen in years. It gets me to where I need to be, and then it gets the hell out of the way. I even like Evolution – which for some reason under wheezy was a snap to integrate into SOGo. Epiphany I can take or leave (it doesn’t render Amazon.com properly, but then I always have the choice of Chromium or Iceweasel) but overall I think the desktop is pretty amazing. There are still a number of rough edges, but I finally have a desktop I’m comfortable with and I can run on all three of my main machines.

Well, I figure by this point I’ve lost my three readers and I’m talking to the guy who found this post by searching for the word “teat” and he’s still here, waiting for a porn picture.

Never one to disappoint – here’s some desktop porn:

How To Install Debian Wheezy on a Macbook Air

Those of you who have been following my #noapple efforts this year know that I am trying to move away from OS X to a Linux desktop. Part of that project involved installing Linux on my MacBook Air laptop.

As someone who travels a lot, I love this little laptop. Weighing just a kilogram, it is powerful enough to do what I need it to do yet small and light enough that I can easily carry it wherever I go in the world. In preparation for upgrading it to Linux, I wanted to increase the stock storage from 128G to 256G, so I purchased an OWC Mercury Auro Pro Express SSD from Macsales.

Unfortunately, I could not seem to get any Linux I tried to install to recognize the hard drive. Fedora failed and Ubuntu failed, but Debian squeeze worked. The downside was that squeeze really didn’t support the kind of desktop I was looking for so it wasn’t an option, and I resigned myself to using OS X on it until it could be replaced.

Recently, Gareth Greenaway posted on Google+ that Debian wheezy (testing) now supported Gnome 3, which was one of the desktops I wanted to try (Jeff Gehlbach has been using it on his Macbook Pro on Fedora for months now). I figured that if squeeze worked, wheezy would too, so I should give it a shot.

Nope – wheezy wouldn’t recognize the drive either. However, being the industrious man that I am, I simply installed squeeze and then did a dist-upgrade to wheezy (yes, this is something I call “fun” – I’m weird that way).

I found out the issue was with the Linux 3.1 kernel. Whenever I tried to boot I would get an error like:

ata1.00: exception Emask 0x0 Sact 0x0 SErr 0x0 action 0x6 frozen
ata1.00: failed command: IDENTIFY DEVICE

followed during boot with errors like:

ata1.0: failed command: FLUSH CACHE EXIT

and then the system would just stop.

However, there was an option to boot to the 2.6 kernel and it would load fine, but with everything compiled against 3.1 I wasn’t able to get things like a video driver working.

Since my desire to run Linux was stronger than my desire to have a large … hard drive, I replaced the SSD with the old one and the disk errors went away.

The following are the optimized steps I took to get wheezy on my Macbook Air (MacbookAir3,1), and when I was successful (it took several attempts to get this to work exactly like I wanted – again, this is “fun”) I did the same install on my 24-inch iMac (iMac9,1 for those of you keeping score at home). The steps could probably be optimized a bit more, but since this works for me I wanted to write it down just so I wouldn’t forget it the next time I needed it, and perhaps it would prove useful for others. I relied heavily on the Debian documentation as well as this post by Mike Dentifrice which was extremely valuable. His was based on Debian squeeze and a lot of what he had to do by hand is now pretty much automatic in wheezy.

You’ll need:

  • Your Macbook Air
  • An external hard drive if you want to save your existing OS X install
  • Your OS X install disk/USB stick
  • An external USB CD or DVD drive (I got mine on amazon.com)
  • An external USB Ethernet dongle (not strictly required but helps immensely)
  • A DVD or CD with 64-bit Debian wheezy (testing)

Note: I’ll state below the differences for installing on the iMac, but the process is pretty much the same.

If you want to save your existing install, start off by using Time Machine to back it up to the external hard drive. Note how much disk space your install uses, since that will be necessary to know when we partition the drive in preparation for installing Linux.

Once that is done, insert your OS X install media and boot it. Choose your language and when you get to the first install screen, launch Terminal from the Utilities menu.

At this point I need to talk a bit about how Apple hardware boots. Instead of using BIOS, it uses EFI (Extensible Firmware Interface). EFI based drives are partitioned using GPT (GUID Partition Table) which differs from the MBR (Master Boot Record) that has been the standard for decades. While I have been told that it is possible to boot Linux using EFI, most are still set up to use MBR, so we will use an open source tool called rEFIt to emulate the MBR.

The key thing to note is that MBR can only boot from a “primary” partition and there can only be four of them. Since EFI requires a small partition as well, that limits you to three operating systems (one on each of the remaining three primary partitions). While storage on my Macbook Air isn’t enough to support, say, a Windows partition, my iMac can and I’ll point out below the change I made for that install (so I plan to dual-boot my Macbook and tri-boot my iMac).

GPT does support a large number of partitions, theoretically unlimited, but systems such as Windows may limit them to 128, so as long as you don’t need more than three boot partitions you can have as many as you like.

For my Macbook Air I decided to have two partitions, a /boot partition and an encrypted root partition. I’ll add a swap file first thing after install. Since only the /boot partition has to be one of the three, I could have made a separate swap partition and a /home partition like I use with my desktop at the office. Having a separate /home partition is great if you upgrade or play around with distros a lot, but I simply didn’t want to have to type in my passphrase twice when booting.

Now, you can install Linux on your Macbook without OS X, but I still have a fondness for Snow Leopard and just in case there are any firmware upgrades I wanted the option to apply them (although one could always install OS X on an external drive and boot to it for that purpose). Since I am worried that I might end up in a situation where I need to boot into OS X (say that I am at a customer site and their VPN doesn’t work on Linux) I also wanted to keep it around for a fallback. But I wanted a really stripped down OS X so I decided to only reserve 30G for that partition.

My partition layout is thus: 30G for OS X, 256M for /boot and the rest for Linux. On my iMac, which I’ve upgraded to a 2TB drive, I’m using 700G for OS X, 256M for /boot, 300G for Windows and the rest for Linux. If you need more for your OS X install, change these values or remove some kruft from OS X (I’d start with Garage Band).

Now if you remember above I asked you to launch Terminal. We’re going to use the command line to partition the disks. On the Macbook Air I ran:

diskutil parititionDisk disk0 3 "Journaled HFS+" Mac 30G "MS-DOS FAT32" boot 256M "MS-DOS FAT32" Linux 50G

This will launch the Disk Utility and partition disk0 into three partitions (four if you include the hidden EFI partition). The first one will be labeled “Mac” with 30G of storage, the second will be labeled “boot” with 256M of storage and the last one will be labeled “Linux” with the remaining disk space. I just put in 50G because you’ll get an error if it is too large, but if it is smaller than the remaining disk space it will use all of it.

For my iMac I used:

diskutil parititionDisk disk0 4 "Journaled HFS+" Mac 700G "MS-DOS FAT32" boot 256M "MS-DOS FAT32" Windows 300G "MS-DOS FAT32" Linux 50G

Again, please note that the bootable partitions have to be in the first three, thus my “Linux” partition will not be used for booting.

This should run without errors and will display the final partition sizes, so you can check that the Linux partition is indeed larger than was you put in the command. Now quit out of Terminal.

The next step depends on whether or not you want to restore from your Time Machine backup or install a fresh OS X. I used this opportunity to downgrade from OS X Lion (which I utterly despise). If you want to restore from Time Machine, you can do so from the Utilities menu, and if you want a fresh install, just follow the normal install steps.

I had encrypted my hard drive under Lion, so when I did this the first time it yelled at me that I couldn’t install onto the Mac partition. A reboot back into the install media fixed that (there was no need to repartition).

At this point in time, you should have a working OS X install. You can do OS X-y things such a turn on FileVault and Software Update at this time if you so choose, but we really just need to use it to install rEFIt.

Download rEFIt and launch the installer package. Under “Customize” be sure to check the only unchecked box to make sure support for Linux filesystems is enabled. Once it is installed, launch Terminal and run:

sudo /efi/refit/enable.sh

which will “bless” the system to boot into rEFIt.

At this point in time I insert my Debian wheezy install media and restart.

rEFIt should recognize the media and offer it as an option, or you can simply hold down the option key after the initial “bong” and select it there, In any case you want to launch the Debian installer.

Follow the install prompts as you would normally. When you get to loading the network hardware you should get an error about missing firmware for the Broadcom wireless card. Here is where it would be possible to load in the firmware, but my time is valuable and it was much easier just to skip that step and use the external USB Ethernet dongle. This was the same on the iMac, but there I just used the built-in wired Ethernet.

When you get to the part about laying out the disk partitions, choose “Manual”. This will bring up the existing partition table. You should see the “hidden” EFI partition first, followed by the ones you created using the command line Disk Utility. There will most likely be some “free” space in between those partitions to make the logical layout match the physical one, and I’ve never been successful at choosing the right values to make those zero. They can be ignored.

Find the partition you labeled “boot” and set the O/S to use it as an ext4 partition mounted on /boot. Important: note the device label. On my install it was the third partition (after EFI and the OS X HFS+ partition) so it was /dev/sda3, but if you used a different layout this could change. We have to install grub into this partition so it is important to note and I had problems with the installer if I went back to check it later.

Next, find your Linux partition and set it up to be used as an encrypted filesystem. The step is optional but I am paranoid, especially when it comes to data on a portable device like a laptop. Unless you are super paranoid and have a lot of time on your hands, make sure the “erase” option is set to “no”. If you forget, don’t worry, you can change it later but if it is set to “yes” then the entire partition will be overwritten with random data before you can go forward and on large disks this can take forever (days on one 2TB drive I used).

When you get back to the partitioning menu, choose the option to set up encrypted file systems. You should be prompted to write current changes to disk, so choose “yes”, and if you forgot to change the erase option you’ll be prompted here and you can say “no” to save some time. Choose the option to set up encrypted partitions, choose the Linux partition and set it up to be ext4 and mount as “/”. You’ll be prompted to enter in your passphrase (don’t forget it or you are screwed).

Once finished, exit the partitioner, write changes to disk, and the install proceeds like normal.

When you get to the part about installing packages, leave the default options as-is, but I always check the SSH server option as well. Feel free to add others if you want, of course.

The next step will take some time depending on the speed of your network (at home this takes a little over an hour). Eventually you’ll be prompted to install the grub bootloader. It will mistakingly state that Linux is the only operating system on this computer (it does so because we haven’t enabled MBR emulation yet) so choose “no” when it asks if you want to install grub into the MBR. Instead, make sure it installs into your /boot partition (as noted above, /dev/sda3 on my system).

Finally, you should reach the end of the install, the media will be ejected and you can reboot.

This time when rEFIt comes up, use the right arrow to select rEFIt’s partitioning tool and allow rEFIt to update the MBR emulation. If everything has gone smoothly, this should work without a hitch. Restart the computer (right arrow over to the Restart icon). I’ve found that any time I run the rEFIt partitioning tool it is a good idea to restart, whether or not there are changes.

Now you should see an OS X option and a Linux option (there may be a grayed out Windows option if you created a Windows partition). Choose Linux and you should be rewarded with a grub menu. Before the 5 second timeout, hit “e” to edit the boot options.

Find the line that starts “linux” and ends in “quiet”. You’ll need to add the word “text” after “quiet” for this next step. On my iMac I also had to add the “nomodeset” option to prevent the graphics driver from hanging the system.

Both the Macbook Air and the iMac use NVIDIA graphics cards. The open source nouveau driver works on the Macbook Air but not on the iMac. Unfortunately, I could not get sleep to work on the Macbook Air under nouveau (which is a pity, since everything else seemed to work, and yes, I spent hours playing with quirks to see if that would help). So at this time I recommend installing the proprietary NVIDIA driver.

The “text” option will prevent the window manager from loading and give us a command line login. Log in as root. At this point I simply determine the current IP address with “ifconfig eth0” and I ssh in from another computer. This lets me cut and paste, etc., but the command line works as well.

First off, we need to create a swap file. Since I have a Macbook Air with 4G of memory, I wanted to create an 8G swap file:

Type following command to create an 8G swap file (1024 * 1024MB * 8 = 8388608 block size):

# dd if=/dev/zero of=/swapfile bs=1024 count=8388608

Set up a Linux swap area:

# mkswap /swapfile

Activate /swapfile swap space immediately:

# swapon /swapfile

To activate /swapfile after Linux system reboot, add entry to /etc/fstab file. Open this file using a text editor such as vi:

# vi /etc/fstab

and append the following line:

/swapfile swap swap defaults 0 0

Next, since the proprietary NVIDIA driver is not free, add “contrib” and “non-free” to your /etc/apt/sources.list file:

deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

Run

apt-get update

to load in the new sources.

Now, at this point in time, it is possible to install the NVIDIA drivers and there are a number of ways this can be accomplished. I used module assistant to build from source:

# apt-get install module-assistant nvidia-kernel-common

followed by

# m-a auto-install nvidia-kernel${VERSION}-source

Typing that command exactly as printed (without the leading # of course) should work.

Once the module is built, run

# apt-get install nvidia-glx

which looks like it will modify X to use the “nvidia” driver, but it doesn’t. I found out that I had to perform an extra step.

Run

# Xorg -configure

and it should throw a number of errors but create a file in root’s home directory called xorg.conf.new. Copy that file to /etc/X11/xorg.conf and edit it. You should see some entries under “Device” that look like:

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "WrappedFB"                 # [<bool>]
        #Option     "GLXVBlank"                 # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "PageFlip"                  # [<bool>]
        Identifier  "Card0"
        Driver      "nouveau"
        BusID       "PCI:2:0:0"
EndSection

Remove all such sections (I had three) and add:

Section "Device"
        Identifier      "Device0"
        Driver          "nvidia"
        Option          "NoLogo"         "True"
        VendorName      "NVIDIA Corporation"
        BoardName       "GeForce 320M"
EndSection

At this point you should be able to reboot into all that Gnome 3 glory. Note that the BoardName is just a label, I used something similar on my iMac which is not a 320M.

From here on out it is just a little cleanup. On the Macbook Air I had to add support for the touchpad.

# apt-get install libmtdev1 mtdev-tools xserver-xorg-input-multitouch

and then I removed /usr/share/X11/xorg.conf.d/50-synaptics to prevent conflicts. Now my touchpad works fine (use two fingers to right click). Reboot or restart X for this to take effect.

I also installed gnome-tweak-tool and reduced the font size from 11 to 8 to better make use of my screen real estate. These last two steps were not required on the iMac.

Finally, I installed the proprietary Broadcom drivers using module assistant:

# m-a a-i broadcom-sta

followed by:

# echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf

and a reboot.

The only issue I have at the moment is that when I first start the wireless, it bounces up and down for a couple of minutes. When it finally connects, everything is cool. This happens as well with an external Asus USB-N13 I bought as a backup (since I had heard that Broadcom under Debian had issues) so something else must be going on, but I figure I’ll cross that bridge when I come to it later.

[UPDATE: Turns out that the issue dealt with IPv6 support and my router. I disabled IPv6 in Network Manager and my bounce issues went away]

If you want to install Windows for a tri-boot setup, you can do it now. Just choose the Windows partition in the installer.

At this point, everything seems to work (well, for certain values of “work”). Bluetooth functions and I tested the camera with cheese.

One last trick – if you want rEFIt to boot Linux by default, edit /efi/refit/refit.conf and uncomment the default_selection:

# Set the default menu selection.  The available arguments match the
# keyboard accelerators available within rEFIt.  You may select the default
# loader using a one-character abbreviation for the OS name ("M" = Mac OS X,
# "L" = Linux, "W" = Windows).  You may also specify a digit between 1 and
# 9, in which case the Nth loader in the menu will be the default.  You can
# also select a rEFIt tool entry ("S" = EFI Shell, "P" = Partitioning Tool,
# "U" = shutdown).  This is intended as a quick fix to change the default
# boot choice until full configurability arrives.
#
default_selection L

This procedure is the result of about ten installs so I hope it saves others some of the time I spent. In any case, I am now much more knowledgeable about how things work, so in the end it was worth it. Plus, I’m on a much freer operating system than the one I left. It was fun.

Thanks to all those faceless documentation writers out there that made this possible. I have tried to embed links where possible to give you the credit.

Dipping My Toe Into the Android Pond

Apple has made me lazy. For my first purchase from the Google Android Market, I got scammed.

As part of my #noapple experiment, I will eventually give up my iPhone. The only real alternative would be something powered by Android, so when woot put a refurbished XOOM tablet on sale a few weeks ago, I bought one.

I didn’t have a need for a tablet. Between my Macbook Air (soon to run Ubuntu) and my phone, I didn’t need anything in between, but in the interest of exploring Android I figured this would be a cheap way of doing it.

So far I like the XOOM. It came with 64 GB of storage and it was easy to add another 32 GB with a microSD card. I immediately downloaded the K-9 mail client (one of the best F/OSS applications on Android) and was soon browsing my e-mail. Well, up until the point my IMAP server got upset and threw a “too many connections from the same IP” error since I was checking mail from my desktop, laptop, phone and now tablet all at the same time.

Now, one of my favorite games for iOS is Plants vs. Zombies from PopCap Games. Without thinking, I went to the “Store” section on the XOOM, typed in “Plants vs. Zombies” and bought the app for 99 cents. It downloaded pretty quickly but when I launched it all that was displayed was a screen with familiar PvZ images stating that it would take awhile for the “levels” to be downloaded.

That should have made me suspicious, but I was tired and I didn’t think about it until it was too late.

See, the Google’s Android Market allows you to return any purchase within 15 minutes, so if a scammer can keep you from returning it within that time period, it becomes very difficult to get your money back. By they time I thought to investigate, that time had passed.

When I did investigate. I saw that the “publisher” was a company called NCM, not PopCap. It seems they have but several well known “apps” into the Marketplace, and my guess is that they are all scams (clicking on the “publisher’s website” takes you to NCM.com, which appears to have nothing to do with Android software).

Once I visited the proper PopCap site, I saw that they sell their software on Amazon’s App Store for Android. The game I downloaded from there worked as expected.

Does this make me want to chuck my XOOM and go back to Apple? Not really. Dealing with Apple has made me lazy, but this doesn’t mean that there can’t be trusted places to buy software for Android. I’ve spoken a number of times about the idea of reputation in free and open source software, and from this experience my trust in Google’s Marketplace has gone way down, and my trust in Amazon’s App Store has increased. Plus, now when I shop on Amazon, it immediately checks the application’s compatibility with my device, which is cool and adds an extra layer of comfort.

One could defend Google, but while I can’t expect them to police every submission, one would think that high profile games such as PvZ could be monitored. While I have submitted a refund request to the developer, my guess is that nothing will happen and they are just hoping people won’t sweat losing a buck.

They obviously don’t know how stubborn I am.

If this charge isn’t refunded by the time my credit card statement shows up, I plan to dispute it. By providing a marketplace, Google is accepting some responsibility for the third parties for which it acts as proxy. I’ll let them and my credit card company sort it out. For example, on a recent purchase through Amazon from a third party, I received the wrong item. Amazon quickly sent me a shipping label and refunded my money, even though it was not their mistake. I’m sure they have some method for resolving things with the vendor, but as a consumer it is not my problem – unlike my experience with Google’s Market.

In the F/OSS world it is as much about service as it is software, and those companies with the highest levels of service will be successful in the long run. If the Android Market is the wild west, I guess the Amazon App Store is the new sheriff in town.

Export iPhoto Library to Folders

Just a quick update on my #noapple efforts.

I work on three main machines: a desktop at the office, a desktop at home and a Macbook Air.

A couple of months ago I started using Ubuntu (Naughty Nightnurse) at work, and I figured I’d wait until 11.10 Onanistic Oliphant was out before upgrading the other systems. I need to write a long post about my decision to use Ubuntu and what I like and dislike about it (no screensaver in 11.10, seriously?) but I’ll have to save that for later. This weekend I got my iMac at home to tri-boot OS X, Windows 7, and Ubuntu.

But for now I want to talk about an iPhoto replacement. I’ve looked at several and I’m leaning strongly toward Shotwell. However, this requires that the image files exist outside of the iPhoto database. I tried just selecting and exporting all of them, but it appears that since several photos have the same name (the default numeric name provided by the camera) the newer files were overwriting the older ones. Kind of a pain when you have around 10,000 images to export.

Through the magic of Google I managed to find a nice little script that will export the images from the iPhoto database into Folders based on events. You can find it on Github, but basically just run:

curl https://raw.github.com/BMorearty/exportiphoto/master/exportiphoto.py > exportiphoto.py

and then

python exportiphoto.py ~/Pictures/iPhoto Library/

I strongly recommend running it in test mode by adding a “-t”. I didn’t realize it, but my iPhoto database had some corruption, and yes, this was after all of the cleanup options available when starting iPhoto while holding down the Command and Option keys.

The problem was in the iPhoto AlbumData.xml XML file. Two of my images had a file type of “^@^@^@^@” instead of “JPEG”, but the real pain was that about 100 photos, around 1%, simply didn’t exist. While there was a thumbnail, there was no image file:

<key>ImagePath</key>
<string></string>

I hope they weren’t anything important.

Anyway, once I corrected the issues in the XML file, the script completed in test mode, and then it did it’s magic and exported all my photos into nice folders, all ready for Shotwell or whatever product I decide to use.