Wednesday, December 31, 2008

Upgrading to Ubuntu Intrepid

I'm finally getting around to updating my Linux machines to Ubuntu 8.10 (Intrepid Ibex). It's not a complicated process, but I wanted to catalog all the steps, for future reference:

  1. Back up anything on your machine you can't bear to lose. Don't assume that the upgrade will go painlessly, and none of your data will be lost. There is a technical name for people who believe that they don't need to back up data before updates: Fool.
  2. OTOH, you don't need to back up your /usr, /bin, /etc, /lib etc. directories, unless you've tweaked them, because even if you hose your installation, when you install a new distribution you'll get all of that back.
  3. Run sudo apt-get update and sudo apt-get upgrade from the command line to be sure everything is up to date on your current system.
  4. Since we're upgrading from Ubuntu 8.04, which has long term support, we need to explicitly tell the system that we want an update to a non-LTS release. Go to System ⇒ Administration ⇒ Software Sources, click on Update, and change the Release upgrade selection from Long term support releases only to Normal Releases.
  5. Kill any processes you've got running in your own space: browser, mail client, emacs, etc.
  6. Go to System ⇒ Administration ⇒ Update Manager. At the top of the window will be a button saying Upgrade. Ignore the Partial update warning messages.
  7. Hit it.
  8. The upgrade process takes some time. You need to check back once in a while, because there will be the occasional question to answer.
  9. It took about 45 minutes via FIOS to download all of the update software.
  10. Took about 5 hours to do all the updates on Hal. Probably way too much software installed. Next update I think I'll start from the CD and only install the software I really want.
  11. It took another 30 minutes or so to remove old packages.
  12. Glad I took the day off.
  13. At the end, you'll probably get a message to the effect that some of your software couldn't be updated. This is third party Unfree software, such as Acrobat, RealPlayer, GoogleEarth, etc. If you're running a truly Free system you probably won't see this message. If you're running Free, though, you're probably running Debian, so you're not reading this. To update your Unfree software, go back to Software Sources, click Third-Party Software and change any lines that say hardy to intrepid. Click the repositories you want to enable (medibuntu for sure, canonical possibly).
  14. Go back to the Update Manager and update your software. There will be updates, probably even if you aren't using the third-party software repositories. When that's done, before quiting, click Check, then update again if necessary. Repeat until your system is truly up-to-date.
  15. Rebuild any software that depends on obsolete libraries. For example, SoX, which I like to build from source to do proper conversions to MP3 format as well as away from MP3 format. This is a good time to get the latest version of these codes.

Sunday, December 28, 2008

A Year of FIOS

Well, in the language of a current TV show, we've been using FIOS for One year, nine days, and forty-six minutes, so it's time for our first annual performance review:

  • It works. Internet, Television, Telephone, all work.

  • The system has no trouble with Linux machines. The tech who installed the router had to use a Windows machine to initialize it, but I think that was more of a tech ability issue than an absolute requirement. I can certainly log into the router via the web interface from either of the Linux boxes, as well as the Macs and the windows machines. I think I've noted that the router won't let you listen to streaming RealPlayer output with a program other than RealPlayer, but that's a minor issue and I could probably call tech support to see how to set the router firewall permissions appropriately. Everything else works fine.
  • We haven't used the telephone that much, frankly. My wife prefers the sound on the copper-wire line we kept, and since I'm not here that much this year we don't often use the FIOS line. I don't notice any difference in sound quality, but you should know that I just found out that a Sonic Screwdriver makes a sound that I can't hear, but everyone else can.
  • TV reception is excellent. There haven't been a lot of the pixellation issues that we had with Comcast digital. The only thing better about Comcast was that they included Starz, Encore, etc., in the standard package. FIOS doesn't, but if you buy the Showtime package, you get all of that as well. (HBO is a separate package, alas.)
  • When FIOS switched to an all digital TV signal last summer, they sent me a free convert box that allows me to access all of the TV channels on my second TV. It doesn't have any fancy features, but it accesses all the FIOS channels.
  • All in all, the quality of service is slightly ahead of Comcast's. However, that has a lot to do with the quality of the connection between the street and the house, and Comcast was using an old cable. If we ever switch back to Comcast, they will hopefully install a newer, high-speed, connection.

So all in all, a positive experience. Knowing what I know now, would I sign up with FIOS again? Yes, absolutely. Next December our two-year commitment to FIOS ends. Will we keep it? It depends on the package Comcast has to offer.

30 Dec 2008: Things I forgot to add the first time:

  • Verizon gives you a measly 10 MB of personal web space, last I looked. I think Comcast gave you about 250 MB. So I had to move my personal web pages to a freebie website provider. Well, it was free except that I had to register my domain with them. Since that only costs $7/year, it's not a problem. But if you have a significant amount of junk content in your current ISP's personal web space, it won't fit into FIOS.
  • The DVR box that we rent from FIOS comes with some nifty widgets, allowing you to view weather, traffic, news, and sports results, along with community information, of which we've had none.

31 Dec 2008: Just one more thing: The FIOS tech can initialize your system without Windows. Just look at the last paragraph of this link. Wish I had known that last year. Oh, well, that was a long time ago, in (almost) another administration, and anyway, that Windows installation is dead.

Friday, December 26, 2008

Breaking Up MP3 Files

I have a small MP3 player that I take to the gym to keep me occupied while I'm working out. It's a hand little thing — except that it's little which means that the buttons are both few, and small.

In particular, the fast forward button is also the next track button — you press quickly to change tracks, and you hold it down to fast forward.

Which brings up a problem when you want to fast forward through a selection: if you are fast-forwarding and let up on the button ever so slightly, it skips to the next track. Which is a really bad thing when your tracks are two hour radio shows.

Yeah, it's bad design. But it's a lot cheaper than an iPod. So let's make do with the player we have, and note that CD players have this same problem with audio books. The audio book publishers have solved this by breaking up the selection, say a chapter, into smaller tracks, which take 3-4 minutes to read. If you need to scroll through a bunch of tracks, you can easily do so at 15-20 key presses per hour of audio.

There's a utility for doing this with MP3 tracks, called mp3splt, available via apt-get in Ubuntu, and presumably available for most Linux distributions, as well as Windows machines and Macs. It will break up an MP3 (or OGG) file into user specified segments. It's pretty flexible, in that you can specify the length of each segment, or break when the silence is longer than a predefined number of seconds, or into fixed-length segments, or, what I like best, into nearly fixed-length segments which are adjusted in length so that they begin and end during silent stretches.

It's a command line utility, and it works really well: except that it destroys about 90% of the ID3 tags, including all the ID3 version 2 information. I don't like that, as my MP3 player can be programmed to sort by title, album name, or performing artist, and I use this to determine the order I'll listen to programs such as Prairie Home Companion and Car Talk.

The canonical command line utility to label MP3 files is id3v2. I used this to write a rather small Perl script, splitmp3, which calls mp3splt to split an MP3 file into chunks which are each about five minutes long, preserving the ID3 labels of the original file, and including the appropriate track number. You can download the file from this link:

Let me know how it works for you, and feel free to add improvements.

Tuesday, December 23, 2008

Rationalizing Your Email

A. Friend recently discovered, yet again, that the Evolution mail client doesn't like it when your Inbox grows bigger than 2 GB. I've never had this problem myself, but a family member once found that Netscape had a similar limit. So let's come up with a few rules about how to keep your email rational. Some of these are written for Thunderbird, my client of choice, but most other mailers have similar options. In no particular order:

  • Don't store your messages at all: Gmail currently has a 7.1GB limit on all messages. And if you use their IMAP function, you can view all your messages in your favorite email client (even Outlook). You can even put the mail in folders, because IMAP interprets Gmail's labels as a client's folders. Of course, you can only read your email when you are connected to the net, but you can read it from anywhere that has a modern Internet browser.

    Note: Don't use Gmail for anything you'd like to be able to delete before the subpoena arrives.
  • Use Filters: I use Thunderbird's filter mechanism to sort email before I read it. All email from news sources goes into a News folder, email from family or friends goes to a folder named for that person, emails from companies I ordered from exactly once goes to /dev/null, etc. Thunderbird then highlights the folder name and tells me how many emails I have unread in that folder (except /dev/null, for some reason), so I never miss anything.

    A.F. wants to post-filter his email: after it's read, put it in an appropriate folder. There's an option for that in the Thunderbird filtering system, as well.
  • Delete stuff: Each one of us has a friend that sends us an attached video, sound bite, or photo album each and every day. Look at them and delete. If something is so funny/moving/outrageous/sexy that just have to keep it, use the Save As feature to save the attachment in its native format, outside of your mailbox. Why? Well, in your mailbox the attachment is stored as 128 bits to the byte ASCII. In native format it will be stored using 256 bits to the byte. Do the math. You can also gzip the saved attachment much more easily than you can a single email in a folder. (Though emacs's RMAIL mode would read gzipped mail easily. Text only, unfortunately.)
  • If you think you simply must keep it in email: Ask yourself two questions: 1) Would I want to get this in an email next year?, and 2) Have I already sent this to 20+ people? If the answer to 1) is No, delete it now. If the answer to 2) is Yes, delete it — one of those 20 will forward it back to you within the week.
  • Compact your folders: Thunderbird, at least, doesn't actually delete an email message when you hit delete. It merely marks the email as deleted, and keeps it in your Inbox. That's handy if you accidentally delete something, but fatal to keeping the size of your Inbox down. Every once in a while use the Compact Folder option.
  • Periodically Reorganize: My work email box keeps getting larger and larger every day, since I get a lot of emails that resist proper filtering. So at the end of every year, I move all of my Inbox into a new folder, this year's will be called 2008 Mail. Do a similar thing for your Sent Mail folder. If you routinely send/receive more than 2 GB of email in a year, and can't bear to part with any of it, the problem's not in your mail client.

Those are my suggestions. Add yours below:

Sunday, December 21, 2008

An Anonymous Duke Student's Comment on the Election

An Anonymous Duke Students Comment on the Election

This appeared sometime in November, it was still there on Friday.

Saturday, December 13, 2008

Cleaning Out Cobwebs

I recently purchased an SVA 19" Widescreen TFT-LCD Monitor. Maximum resolution 1440x900, thin panel, internal speakers (but no manual volume control, yech), user's manual in something resembling English, and it was on sale for $99.95 at Staples. Works fine. Monitors are a commodity these days, anyway.

But that's now why I called you here today. The problem was that Hal, here, couldn't display the 1440x900 resolution of the monitor. Even though Hal's Formerly Evil Twin, running on an even bigger monitor down in Raleigh, had no trouble. All Hal could do was 1024x768, which tends to stretch out on a widescreen monitor.

It didn't take long to find the problem. Here's the relevant section of Hal's /etc/X11/xorg.conf file:

Section "Screen"
 Identifier "Default Screen"
 Monitor  "ENVISION"
 DefaultDepth 16
 SubSection "Display"
  Depth  1
  Modes  "1024x768" "800x600" "640x480"
 SubSection "Display"
  Depth  4
  Modes  "1024x768" "800x600" "640x480"
 SubSection "Display"
  Depth  8
  Modes  "1024x768" "800x600" "640x480"
 SubSection "Display"
  Depth  15
  Modes  "1024x768" "800x600" "640x480"
 SubSection "Display"
  Depth  16
  Modes  "1024x768" "800x600" "640x480"
 SubSection "Display"
  Depth  24
  Modes  "1024x768" "800x600" "640x480"

No resolution is above 1024x768. And ENVISION means that this was set up for a monitor I got rid of a year or so ago. In fact, this xorg.conf file might well go back to the days when I was running Fedora. so this might, just might, need a little modification.

To fix this in the olden days, say 2004, you'd track down all of the parameters for the current monitor, edit the file with the appropriate information, and hope all was well. Later there were scripts that did some of that, if the monitor was well known.

Now you just run

sudo dpkg-reconfigure -phigh xserver-xorg

This generates a default xorg.conf file, with the relevant section

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"

xorg itself then configures the monitor, device, etc., if you Ubuntu has all the drivers. This won't work for everything, and if you have a video card with proprietary drivers you're going to have to load them up, but it's a heck of a lot easier than back in the day.