2012-05-09

Ubuntu 12.04 on MacBook Install Notes

This is a follow-up to http://blog.michaelkelly.org/2010/05/ubuntu-1004-upgrade-notes.html.

These are my notes from a clean install of Ubuntu 12.04 on a MacBook 2,1, in which I set it up to use Awesome WM. (I don't use the default Unity interface and associated daemons.)

Like last time, to get your Macbook version:

sudo dmidecode -s system-product-name
(It's "MacBook2,1" for me.)

Installation
If you're installing from a physical CD (and possibly otherwise), you need to use the "+mac" disk image from http://cdimage.ubuntu.com/releases/11.04/release/. The default amd64 image will not boot. (Otherwise you will get an unresponsive black screen with the text, "Select CD-ROM Boot Type : ".)

Window Manager
Ubuntu 12.04 uses lightdm, which thankfully still uses the .desktop files in /usr/share/xsessions/ to select which window manager to start. I created /usr/share/xsessions/xsession.desktop, with the following contents:

[Desktop Entry]
Encoding=UTF-8
Name=Xsession
Comment=Run ~/.xsession
Exec=/etc/X11/Xsession

I dropped in my existing rc.lua for Awesome.

Networking
gnome-network-manager and nm-applet work out of the box, and are fine in isolation. I use them.

Touchpad
I set up the touchpad to turn off "tapping" (clicking without pressing the trackpad button), enable two-finger vertical scrolling, and 3-finger middle-click with the following line in my .xsession:

synclient MaxTapTime=0 PalmDetect=1 \
    PalmMinWidth=85 PalmMinZ=17298 \
    VertEdgeScroll=0 ClickFinger3=2

Power Management
This was the trickiest part. In 10.04, I used gnome-power-manager to handle: (1) suspending when I closed the lid, (2) listening to the brightness up/down keys, (3) dimming the screen when I was on battery power, and (4) providing a nice systray applet to see battery level and whether I was on AC power. gnome-power-manager doesn't exist anymore in 12.04. There doesn't appear to be a drop-in replacement that isn't attached to large desktop manager or another. So:

For (1), I read a very helpful Arch Linux wiki page, https://wiki.archlinux.org/index.php/Acpid, and added a line to /etc/acpi/lid.sh. Right below:

       . /usr/share/acpi-support/screenblank

I added:

     pm-suspend

Simple! (Once I knew where to go looking...)

For (2), I added lines to my Awesome config (rc.lua) to bind them to "xbacklight + 20"/"xbacklight - 20".

For (3) I just sucked it up and went without. I could also have added lines to /etc/acpi/power.sh, I believe.

For (4) I'm going to write a widget in rc.lua.

Customization
This wasn't necessary, but I thought it was nice:

echo "allow-guest=false" >>  /etc/lightdm/lightdm.conf


2012-02-24

Migrating Off Google Reader, continued

It's been obvious, since Google Plus was released, that Reader can't possibly be long for this world, and everyone has to simply jump ship. (I'm saying this based solely on outside observation.)

Luckily for me, I didn't use most of the social features of Reader. It served basically as an online list of links I thought were cool, and an RSS reader.

For an online list of links, the obvious choice is del.icio.us. It's been working very well for me. The little bit of sociality I did use in Reader, following other people, has ported over nicely to del.icio.us as well.

For an online RSS reader, it's less obvious. Most of the options seem to have been decommissioned, have turned into awful "enterprise"-focused products, or simply don't work. After some searching, I found netvibes.com, which actually isn't a competitor to goodvibes.com.

I'll see how it goes. Luckily, it looks like Google Reader was completely replaceable.

2012-01-17

PIPA and SOPA

If you run a little backwater website (like a friend and I do) that still gets some viewers, take a moment and put up a banner noting your opposition to SOPA and PIPA. The superficial victories we've seen recently aren't permanent.

Reddit and Wikipedia are going dark on Jan 18th in protest. I think shutting off entirely is a move better suited to sites with clout, but it sure can't hurt for any site to put up a notice. It's better than just standing on the sidelines and cheering on Wikipedia and Reddit.

No one will see this post, because I fucked up my DNS entries when I changed DNS providers. But I know it's here.

2011-12-26

Hosting, DNS, and Domain Name Regstration

I'm moving from my n00b setup of using my domain name registrar's DNS servers to a third party. This way, my registrar, authoritative DNS servers, and web hosting will all be run by separate companies. This makes it less troublesome to change any one of them. (Separating web host and registrar is probably the most important, as your web host is most exposed to your actions, and therefore probably most likely to cut you off. But as long as they don't control your DNS or your domain name, you can swap them out in a matter of hours.)

I'm completely ignorant of the general situation among DNS hosts, but it seems like a pretty straightforward business. Unlike registrars and web hosts, there don't seem to be that many large players here. (Perhaps because the space between people who use their registrar, and people who run their own DNS servers isn't that big? I desperately don't want to be in the business of babysitting BIND, though, so I want someone else to run this stuff or me.) The general pricing scheme seems to be price-per-zone + price-per-X-queries. Seems completely reasonable.

Setup I'm looking at right now:
Registrar: name.com
DNS: Amazon Route 53
Hosting: Google Apps
HTTP redirection: Google Apps (for naked domain/zone apex to subdomain)

I don't have a replacement for my previous host's more-flexible redirection.

Of course, I don't actually *need* any of this bureaucratic fault-tolerance, but it's a nice exercise in paranoia.

For more options, I found this comparison page here, which is mostly useful as an enumeration of options to evaluate. There's also an anemic thread on /r/sysadmin.

2011-12-01

Things I Have Learned to Understand After Moving to the East Coast

Context: I moved from San Diego (where there is no cold) to New York (where there is; [shut up, Midwest]) two years ago.
  • Hot drinks. When it's cold outside, drinking anything hot is very satisfying.
  • Hot showers. When it was cold yesterday and you think it will be cold today, hot showers are a great relief.
  • Scarves. Not just for the French anymore.
  • Gloves. When I was in San Diego, I always silently judged people who wore gloves. After being out in the snow during a Massachusetts winter and discovering my own gloves were inadequate and I in fact needed stronger gloves, I've changed my mind.
  • Long underwear. Only in extreme circumstances. They make regular pants into super pants.

2011-11-23

Software RAID in Linux with mdadm

I run a RAID 1 (mirroring) with 2 disks. Cheap and simple. (And I don't have to fuck around with RAID card support under Linux.)

I just had 1 disk fail, so I'm about to replace it:
Hold on to your asses everyone. Reminder to self: pull the right disk.

[Edit: Success!]

2011-10-31

Google Reader -> Del.icio.us

I guess del.icio.us isn't called del.icio.us since Yahoo! bought it, but whatevs.

Google Reader, which has been slowly dying for several years now, just got dismantled a little bit, when its "Share" feature went away in favor of Google+.

The good news is that it's extremely easy to export your shared items. There's the nice export page here: http://www.google.com/reader/settings?display=import.

There is also an Atom feed available from http://www.google.com/reader/shared/: click "Atom feed" on the right, then change "reading-list" at the end of the URL (it'll be preceded by a "%2F") to "broadcast?n=10000" (or substitute any suitably large number for n).

Someone wrote a procedure and (naturally) a Perl script for converting your Google Reader shared items to a bookmark file that things like del.icio.us can read.

Cheers.