iPhone 3G: Activation

Activation is the scary part of the iPhone process. Tales abound of yesterday's long waits and crushing failures. Unfortunately, my story is no different.

I got my iPhone home at about 12:30 P.M. today. When I connected it to my MacBook (named Caladan for reasons that anybody familiar with my computer naming scheme should understand), iTunes started right up and registered it. Alas, the phone made a little "sad tweet" and informed me that it had no service and the service was required for activation. Hm.

Well, even though my crappy Motorola L2 has 5 bars everywhere in my dorm, maybe the iPhone just isn't that strong. So let's try taking it outside, where every cell provider in the universe has 5 bars. Nope. Still no service. <google />It looks like some iPhones were shipped with inactive SIM cards. Well, that's a bummer. Let's call AT&T customer service...

I called AT&T (on my Motorola) and talked to a representative named Keasa Arnold. She walked me through some basic troubleshooting steps (try the SIM card on my other phone, try my other phone's SIM card on the iPhone, etc.) and told me she was just leaving for her lunch break, but would call me back in a few minutes any way. I went through the rigamarole, but no luck. Ms. Arnold called me back and we jointly concluded that the SIM card must not be set up correctly. A couple of minutes of typing on her end and I had 5 bars on my iPhone. Kudos to Ms. Arnold and AT&T wireless; yet again, they've impressed me.

Next up: first impressions

iPhone 3G: The Purchasing Process

iPhone 3G

My iPhone 3G experience started this morning at about 5:50 AM, when I left my dorm to get an iPhone 3G. I hiked over to the Montclair Transcenter and picked up the 6:30 OmniTrans Route 66 bus heading Eastward. At about 7:05, I stepped off the bus, thinking I was there. Unfortunately, I was at another bus stop in front of a Best Buy with a gas station next to it — about a mile and a half shy of the Victoria Gardens Mall, where the Apple and AT&T stores were. A half-hour of hiking later, and I was there.

I passed by the AT&T store, which had about 20 people in line in front of it. However, I have a terrible history with AT&T customer service, so I figured I'd go to the Apple store. I was #45 in line at the Victoria Gardens Apple Store, next to a nice guy named Matt who was reading Aldous Huxley's "Brave New World". It was 7:43 A.M. now, and the Apple store was set to open at 9:00.

At about 8:25, an Apple store employee came out to ask us if we had any questions. Now, some background. I am on a Family Talk plan, with my Mum as the primary. I called AT&T last week to see what I would have to do to get an iPhone, and they instructed me to have my mother add me as an "Authorized User" on our account, then it would be smooth sailing. I did this. Now, I tend to be an unsure fellow, so I asked the Apple store employee whether I had done the right thing. I had, apparently, not. According to this employee, Apple would not activate any phones purchased without the account primary present. Seeing as how my mum is about 3000 miles away right now, that's not really feasible. I got a bit huffed, as you might imagine. He said that I should try the AT&T store, although he wasn't sure whether they actually had any iPhones in stock.

So, frustrated, I headed over to the AT&T store, where the line had grown to about 45 people. I begrudgingly stepped to the back of the line, where I chatted with a nice woman named Angel who, apparently, works Customer Service at a casino. After a couple of minutes, the store manager came out to see if anybody had any questions. I flagged him down and explained my situation. After a moment's thought, he told me that it'd be no problem, and I could purchase my iPhone. Score one for AT&T.

At almost exactly 9:00, the AT&T store opened up its doors and started taking people four at a time (there were only four non-managerial employees, from what I could see). I was a bit worried that they wouldn't have any in stock when I got there, but the friendly manager assured me that they would. As I crept up the line (enjoying complimentary ice water, score another for AT&T), the manager kept taking head counts and assuring us that he still had iPhones in stock.

Finally, I reached the front of the line. Lo, they still had iPhones in stock! Admittedly, they were out of 16G models, but that's okay with me. A four minute transaction later, and I had my new iPhone 3G. Contrary to popular opinion, AT&T did an excellent job of customer service, and Apple sucked royally.

Next up: Activation

Firefox 3

So, I got bored this weekend and installed Firefox 3 (beta 5, if it matters to you). It works pretty well — it's certainly faster than Firefox 2. However, there are a couple of annoying bugs that I'd like to post the solutions to for posterity:

If you use a dark theme (like I do), then many textarea and input form elements will be unusable because they will have a dark foreground color and a light background color. The solution to this is to add a userContent.css to ~/.mozilla/firefox/ /chrome. There are lots of guides on the Internet for this file, so I won't go into it. However, the difference from Firefox 2 is that now any sections that you want to actually be interpreted for reskinning "native" controls (like form input boxes) need to have a -moz-appearance: none !important; rule. There should, however, not be any @namespace directive.

The other annoying thing is that the Awesomebar thinks links should be green. Don't get me wrong, I like the awesomebar, and I like links, and I like the color green. But green really doesn't work with my theme. So I reskinned them, using the userChrome.css file in the same directory as userContent.css. Copying the example will get you the @namespace directive, which is important in this file. Then, the following lines will get you some nice blue-ish links (this color looks good on a dark background):

.ac-url-text {
    color : #8888cc !important;
}

You can thank grep for the relevant style class. Anyhow, I'd be interested to hear any of your opinions on Firefox 3. Otherwise, have a nice week-end.

*nix Tip of the Day: sudo

I've mentioned sudo in these tips before. It's a neat little utility for executing commands as somebody else. Well, today I bring you a handy guide I found on using sudo. I already knew most of the stuff, but some of it was new, and it looks pretty good as a starter for new users. So enjoy this article on sudo basics by A.P. Lawrence.

Debian OpenSSL

Sorry readers, no *nix Tip of the Day today. Just a brief word about the recent Debian OpenSSL vulnerability.

I'm sure you've heard about Debian's OpenSSL "Disaster". The short of it is that while fixing a questionable line in the OpenSSL/OpenSSH key generator, the Debian maintainer accidentally removed most of its entropy generation ability. Debian users with OpenSSL and/or OpenSSH keys should go regenerate them now. I'll wait.

Anyhow, the other interesting thing I wanted to post about was this. It's some interesting math showing why you shouldn't be using DSA keys anyway.

Oh yeah, and I'm done with classes and finals now. :-)

*nix Tip of the Day: tee

tee is a handy little utility that probably all of you know about, but I just found this year. Consider the following scenario: you're maintaining your Gentoo Linux system and you need to add a line to /etc/portage/package.unmask. So you type

sudo echo "sys-kernel/gentoo-sources" >> /etc/portage/package.unmask

right? Nope! The way shell parsing works, that turns into

(sudo echo "sys-kernel/gentoo-sources") >> /etc/portage/package.unmask

which is most certainly not what you want, since you probably don't have permissions to /etc/portage/package.unmask. The solution is the tee utility. It would be invoked like the following:

echo "sys-kernel/gentoo-sources" | sudo tee -a /etc/portage/package.unmask

Well, this was a short post. Oh well. :-)

*nix Tip of the Day: rxvt-unicode and terminfo

An important part of a *nix system is a good terminal emulator. For some, this means the classic xterm. The same xterm that's happy to use 7 MiB of resident memory for each instance. Or perhaps you run a full DE like Gnome and are happy to use gnome-terminal and enjoy 19 MiB of resident. Personally, I use rxvt-unicode (urxvt). It's a very lightweight version of rxvt which has neato features like full Unicode support and a daemon mode that lets you pool multiple instances. For example, my urxvtd processs is using 41 MiB of resident, but hosting 9 urxvtc clients (a little over 4 MiB per client). It's several sorts of awesome.

Now, another important part of the terminal emulator infrastructure is the terminfo library (successor to termcap). This library contains terminfo definitions for pretty much every terminal emulator out there and allows the shell to make intelligent decisions about things like fonts, colors, and sizes. Unfortunately, I said "pretty much every terminal emulator" for a reason. rxvt-unicode is not one of the terminal emulators that is part of the standard library. Thus, my prompt, which normally looks like [11:06] <roguelazer@CaveOfBirds> ~ % ends up looking like 33mCaveOfBirds> ~ % when I log into a server that I've never logged into before.

So, what's the resolution to this problem? It took me a while to find out, but the key is the tic utility (which stands for terminfo compiler). Terminfo descriptions are distributed as a (almost) human-readable source format. urxvt's can be found here. Once you've acquired a source file, simply run tic on it. If you run tic as a normal user, the compiled terminfo description will be installed to ~/.terminfo; if run as root, it will be installed system-wide in /usr/share/terminfo.

As usual, come back later for some new and exciting tips.

*nix Tip of the Day: SSH SOCKS Proxying

Continuing on my theme of SSH tips, today's Tip of the Day talks about the awesomeness of SOCKS proxying. As some of the more savvy among you may know, OpenSSH supports full Layer-2/Layer-3 VPN functionality using a tun device. This is an incredibly useful feature if you're off-site and need like-local access to home, work, school, or somesuch. But it requires root access, and is more than a little bit of a pita to set up. If all you need is access to things like the web, e-mail, and instant messaging, there's an easier way.

SOCKS is a transparent proxy protocol. Basically, you just tell your applications (like Mozilla Firefox or Pidgin) to connect to a SOCKS server, and all of your traffic is automatically redirected. If you're on the wrong side of a restrictive firewall, or not in the right intranet, and you have access to a SOCKS server, that's great. But most of us normal humans don't get access to a "real" SOCKS server.

And that's where yet another awesome OpenSSH feature comes in. OpenSSH has a single-flag SOCKS server built right in. Say your school computer is called, erm, remote, and you have a user there who is creatively named user. Now say you're off-campus and really want to look at the on-campus-only student roster. You could screw around with TCP forwarding over SSH, or perhaps try to run links on your school machine. Or you could just type ssh -D65500 user@remote (note: the "65500" part is not important. Any number between 49152 and 65535 can be used with no problem). This creates a SOCKS proxy that goes through remote, but listens on port 65500 on your local machine. So now you open up Firefox's Preferences, go over to Advanced->Network->Connection->Settings, and put in a SOCKS Host of "127.0.0.1" port "65500". It doesn't matter whether you select v4 or v5 for this purpose, since OpenSSH supports both.

Congratulations, you're now talking to the internet through a transparent proxy. When you're done, just restore Firefox's old settings and quit SSH.

Check back later for new and exciting things to do in the *nix Tip of the Day series!