Ubuntu on MacBook Update: Touchpad Tweaks

One major problem I had after installing Ubuntu was accidental trackpad input while typing. This caused me to accidentally select text in a text editor, which (upon further typing) would be replaced; or I would accidentally click off of the Gmail textbox I was editing and then start executing a bunch of Gmail keyboard shortcut commands; or I would accidentally scroll using my palms. All of this was excessively annoying, and there wasn’t a good way to fix it with the limited touchpad options built into the Mouse preferences dialog.

Solution: Install the Pointing Devices preferences pane. You can get this through the Software Center. After installing it, you have significantly more fine-tuned control over the touchpad behavior. For my own setup, I configured it to disable touch and scroll behavior altogether, and to disable the touchpad entirely when an external mouse is connected. If you wish, you can disable the touchpad entirely through this dialog.

Ubuntu on my MacBook

My latest project was to install Ubuntu 10.10 on my MacBook 2.1 (mid-2007 model). I’ve gotten a few questions about what the process was like, and how I overcame some snags, so I’ll make a few notes here about some particularly thorny problems.

1) Installation

Before you install, make a full backup (obviously). Besides that, you will need a Mac system file for the iSight to work, so copy this file (using Terminal) to a USB stick or external hard drive:

I used a 10.10 LiveCD for the installation, and I did a single-boot. If you put in the LiveCD, reboot your Mac, and hold down the Alt/Option key, it gives you an option of whether you want to boot from the HDD or the CD. Choose the CD.

Once the LiveCD is loaded, you have the option of installing or trying. Choose trying. When you get into Ubuntu, open the GParted partition editor. Delete the existing partitions and Edit > Apply. Then create a new partition scheme and choose msdos (should be the default). Reboot. At this point it should auto-load from the CD, but if it doesn’t, do the Alt/Option trick again and force it to boot from CD.

This time, select Install. Connect the system to a network (wireless or wired) before doing the install so you can download updates and third party drivers while you install. You will be prompted to create a new keyring for the wireless network password, but cancel out of this, because it will cause headaches later.

Once Ubuntu has been installed, you will need to bless the drive so that you don’t have a long EFI wait before GRUB loads (i.e., the white screen that shows up when you power on your machine won’t stick around for very long). To do this, reboot your machine, hold down Alt/Option, put in the OSX CD, and load from the OSX CD. When it comes up, select your language and click the arrow. Then, open the Terminal, and execute the following:

When you’ve executed this command, click on the Installer menu and quit, and select reboot.

2) Headphone Jack

The headphone jack won’t work properly once you install (for some reason). The red light comes on inside it and the headphone jack won’t play any sound. To fix this, open Terminal and launch alsamixer.

From within alsamixer, hit tab twice to bring up the full panel. Press right until you get to S/PIDF and hit m to mute it. That will turn off the red light. Then press left to go back to the second Speaker option, which should have a MM tag instead of a 00 tag under the volume level. Press m to unmute it and your headphone jack should work again.

In order to save these preferences, hit Esc to get out of alsamixer and back into the Terminal, then execute:

3) iSight & Microphone

In order to use the iSight and microphone (essential for video chat) you have to make some changes. For the microphone, just go to Sound preferences, Input tab, and unmute the microphone.

For the iSight, you will have to install the latest version of isight-firmware-tools. Installing them from apt-get gives you an older version of the tools that is not compatible with the latest firmware and won’t work. You have to go to https://launchpad.net/~mactel-support/+archive/ppa/+packages and download version 1.5.92. Before the install, copy the AppleUSBVideoSupport file to ~/Downloads and give the installer this path:

Restart your machine and the iSight should work. You can install Cheese to test it, or go to the preferences in Skype and do the camera test.


  1. https://help.ubuntu.com/community/MacBook
  2. https://help.ubuntu.com/community/MacBook2-1/Lucid
  3. https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
  4. https://help.ubuntu.com/community/MactelSupportTeam/AppleiSight
  5. http://ubuntuforums.org/showthread.php?t=1498561
  6. http://ubuntuforums.org/showthread.php?t=1568368&page=2


I’m attempting to install and configure Subscribe2 for managing email subscriptions to my websites, and so far, it’s been a little frustrating. Documentation is sparse – perhaps because they want you to buy Subscribe2 paid edition in the WordPress app store. Hopefully this post will send an email to my email account with the post information.

New Host

I’ve migrated to a new host: BlueHost. I left 1&1 after some careful consideration that boiled down to the following:

  1. 1&1 is running Apache 1, which is no longer supported, and doesn’t play nice with modern software. Most notably, you have to hack Gallery 3 to work with it, and mod_deflate is only available on shared hosting platforms through the official release for Apache 2. (mod_deflate gzips your files before they get sent to the browser, dramatically speeding up download times.)
  2. 1&1 doesn’t have a lot of utilities installed for you, such as ImageMagick, meaning that you have to install them yourself.
  3. The support is terrible. In almost all of my support calls, the support staff didn’t know much of anything about the way shared hosting was set up, so support calls were long and frustrating. During one call, the support analyst was about to overwrite an .htaccess file for a production site without my consent, despite the fact that the phone call was about the development environment.
  4. The undocumented zombie-process-killer application they have running on their servers. Despite having the script timeout set to unlimited, any script that runs for longer than 60 seconds will eventually get unceremoniously killed by a zombie-process-killer application that they have running on their serves, which is not documented anywhere. Not only is it not documented, the support staff don’t know about it, because an hour plus long conversation with a support analyst about my long-running script dying on me without a word of explanation yielded a bunch of unhelpful suggestions about logging my own PHP errors (as if that would catch the contents of an HTTP 500).

I’ve been pretty happy with the service so far. BlueHost uses cPanel for administration, which is standardized, so it’s familiar to anyone who has used cPanel on other hosting installations before. The prices are significantly better, also. We were paying $11.99 / month over at 1&1, and we are now paying $6.95 / month for BlueHost. 1&1 gave us three free domain registrations per year, whereas BlueHost only gives us one, but the extra domain is still only $10 / year – so we are saving $50.48 overall. Plus, BlueHost gives you unlimited storage space and bandwidth, and we were limited to 250 GB on 1&1 (not like we were using that much space anyway, though).

My one major complaint with BlueHost is actually a criticism of cPanel, as far as I can tell. When you sign up, the first domain you assign to your account is the primary domain, and all of the files for the primary domain are located in /public_html. The problem is that you can’t change this path for the primary domain. All additional domains and subdomains have their files put in /public_html/somefolder, which means that you can access those sites by going to http://www.primarydomain.com/somefolder, and you can’t keep your domains siloed. For sites that I create myself, I prefer to keep all of my controllers, views, models, and functions outside of the web-accessible path – the web-accessible path has an index.php that calls controllers (using mod_rewrite), and other than that, it contains images, PDFs, CSS files, JS files, and other non-PHP content. Isolating your PHP files in a non-web accessible directory in cPanel seems to be possible, but an absolute pain to maintain. Additionally, when you register a second domain (in this case, http://www.kelseyandkevin.com), it automatically creates a subdomain on your primary domain (in this case, kelseyandkevin.kevinfodness.com) which you can’t delete. It does this “for your convenience,” but it would be significantly more convenient if I had a choice as to whether this subdomain was created or not. 1&1 did not have this problem – it let you put your files wherever you wanted, and let you set specific directories for your sites.

I don’t have any problem with being forced to put all of my web content in public_html, but I would certainly like to be able to set my primary domain to pull its files from a subdirectory of public_html, and I would certainly like to be able to control what subdomains exist on my account for all of my domains, and be able to delete them at will.

I saw a suggestion on one of my searches about creating a ‘www’ subdomain for the primary domain, and redirecting content from domain.com (minus the www) to the www domain, which I will explore. However, that’s kind of a ‘hacky’ solution, because I would have to write a redirect for the non-www domain, and I would also have to write redirects for the subdomains I don’t want. Grumble, grumble.

Anyhow, I’ve implemented GZIP compression, cache control, and some other useful things that I got from Google’s Page Speed Firebug plugin to speed up the display of both kevinfodness.com and kelseyandkevin.com. I’ll be adding more performance enhancements in the coming weeks also.

In other news, I will be working on my department’s website this semester, and implementing performance enhancements, accessibility features (following the WCAG 2.0), and updating content. I’ll be blogging about my experiences working on that project, particularly the accessibility stuff, in the coming months.

PHPParser Plugin for jEdit

I was struggling with managing functions in large class files (2000+ lines), and the built-in folding functionality of jEdit wasn’t helping very much (indent mode doesn’t like HEREDOCS). So I downloaded the PHPParser plugin, set my folding mode to Sidekick, and it works great. Not only can I fold down functions and blocks of code, I can also easily jump from function to function by clicking on the function name in the sidekick. Win.