Now that I have a new primary computer, and have settled into using it (and converted my old laptop install into a virtual machine), I've reinstalled my previous laptop (HP NC6220) with the latest version of Ubuntu Linux -- 10.04 LTS. (It was previously installed with Ubuntu Linux 6.06 LTS, later upgraded to Ubuntu Linux 7.10, then to Ubuntu Linux 8.04 LTS; I decided on a fresh reinstall this time -- rather than upgrading it again -- because I want to travel with it and would prefer (a) to encrypt more things and (b) to be able to reduce the amount of data on the machine.)

Much has been made of Ubuntu's choice to change the close/minimise/maximise buttons to the left hand side with 10.04 LTS (most Linux desktops have traditionally followed Windows and put them on the right), but having spent much of the last 18 months using OS X as a primary desktop (at my previous job, and then my own) having them on the left hand side actually seems more familiar to me now. Win!

Installed as follows (mostly notes for my own purpose):

  • wipe drive ("badblocks -b 4096 -s -v -w /dev/sda" from a Live CD)

  • install from Ubuntu 10.04 LTS Desktop i386 CD

  • custom partitioning scheme:

    • 256MB /boot
    • 2 * 2GB swap (suspend space)
    • 32GB / (root)
    • 80GB /home
    • approx 40GB unallocated (drive upgraded from original to 160GB)
  • choose "Encrypt and unlock my home directory" when creating account to get an encrypted home directory (and a new just-for-this-laptop password)

  • after booting new system allow it to run encryptfs-unwrap-passphrase to show the raw passphrase for decrypting the home directory, and save that somewhere safe for recovery purposes (but at this stage I don't plan to have anything critical only on the laptop)

  • join home wireless network (Airport Express)

  • install all (security) updates

  • run Rhythmbox (Music Player) and install MP3 plugin (after copying over music into ~/Music/mp3); alas it seems to suffer from the iTunes problem of not really knowing what to do with albums which are collections of artists (but at least iTunes has a workaround; I've yet to find one for RhythmBox)

  • set focus follows mouse with System -> Preferences -> Windows -> Window Selection -> Select window when mouse moves over them (but don't select auto-raise as that makes it impossible to type into a window in the background while looking at something else; useful on a smaller screen)

  • In Firefox, Edit -> Preferences -> General -> Startup -> "When Firefox Starts: Show blank page"; also disable the Bookmarks Bar (untick View -> Toolbars -> Bookmarks Bar) to reduce wasted space.

  • Use alsamixer to turn on "Headphone Jack Sense" so that plugging in headphones causes speaker output to cease; it used to be possible (in earlier Ubuntu Linux versions) to do this in the Gnome "Sound Preferences" in a "Switches" tab, but there doesn't seem to be a Switches tab on Ubuntu Linux 10.04 on the NC 6220.
    (Ubuntu Sound Troubleshooting doesn't talk about that setting, and searching the web for answers mostly finds issues with the snd_hda_intel driver rather than the snd_intel8x0 driver used on the NC6220.)

  • Change workspace switcher (right click on switcher, choose "Preferences") to be 3 columns by 2 rows; add workplace switcher panel to the top panel (right click, add to panel, choose "Workplace switcher", and click "Add").

  • Delete the bottom panel to conserve screen real estate (also conveniently makes layout a bit more like MacOS).

  • Set background to solid black (System -> Preferences -> Appearance -> Background; Colours: Solid colour, choose "#000000", then pick the top left background)

  • Change theme to "Clearlooks" to get more contrast, but restore the window buttons to the left: System -> Preferences -> Appearance -> Theme, choose ClearLooks. This will end up changing the menu button layout back to the old one, so that needs to be corrected separately: run "gconf-editor", go to apps->metacity->general, and change "button_layout" to be "close, minimise,maximise". (For the Linux traditional layout use "menu:minimize,maximize,close".)

  • Change clock to display in 24 hour format (right click on clock display in panel, choose "preferences") (While there add useful locations, so that the weather display works.)

  • Get rid of random sounds (eg, login), System -> Preferences -> Sound: choose Sound Theme "No Sounds". And prior to login: System -> Administration -> Login Screen: disable "Play login sound".

  • Change Terminal Font to "Liberation Mono: 8" (alas, unlike many other platforms it seems only 8pt or less is small enough to fit two windows side by side on 1024x768 screen; MacOS X manages this with the more readable Monoco 10pt). Change default window size to be 80x52.
    (Both done from within Terminal, "Edit Profile...".) (Annoyingly there doesn't seem be a way to hide the menu bar by default, which means it takes up two rows of text for no especially good reason; I may yet go back to xterm with "Fixed" which works perfectly...)

  • Change fonts to 8pt to try to reduce wasted space (System -> Preferences -> Appearance -> Fonts); each one has to be changed individually. (8pt may be too small, but 10pt is definitely too big; perhaps try 9pt as the Goldilocks value.)

  • Install openvpn, and appropriate config/certificates to connect to my hosted server; configure to start on boot.

  • Set up Evolution for primary mail account access. Be sure to turn off the Junk mail filtering as that seems to imply downloading (and caching) the message to see what is in it. Also make sure that the Sent Messages folder and the Drafts folder are set to be on the mail server, to make it easier to move between devices (Edit -> Preferences -> Account -> Defaults). (Unfortunately Evolution uses the Gnome Password Store, which is locked with the account login password and unlocked when you log in or unlock the screensaver -- so there isn't the equivalent of the Thunderbird Master Password concept to only unlock the passwords when the mail application starts. (And if you use auto-login then the gnome keyring doesn't get automatically unlocked, leading to more confusion.) The other thing they suggest is an encrypted home directory, which I already have.)

  • Install Thunderbird for second account mail access, configured with a master password to unlock mail account passwords and to not retain messages for offline usage (reduces footprints left on the hard drive).

Suspend (to RAM) and hibernate (to disk) both seem to work reasonably reliably, although suspend is still only triggered by the lid button once (and some testing suggests that the problem is that the ACPI events aren't being retrieved, because doing something else that forces ACPI events seems to trigger the pending suspend). Seems to be a long standing issue affecting various HP laptops over various versions; alas a kernel.org bug on the issue got closed when the testing user didn't have time to complete additional tests for the developer. For now the fn-F3 suspend will work so I'll just have to remember to do that. (Related HP bug for lid switch controlling video, and similar RedHat bug but alas the workaround doesn't work for HP NC6220 apparently due to the state not changing; and another one implying that a power supply transitition is enough to make things work again, which would tend to confirm my theory about missing events, even if it doesn't seem to fix things for me.)

Sadly it appears the HP NC6220 issue with turning on the speaker amplifer again after suspend is back again :-( Looks like it was reintroduced in 9.10 (presumably while trying to fix something else) and affects 9.10 and 10.04. Hibernating (suspend to disk) is enough to get the speaker amplifier turned on again. At some point I might go looking and see if I can find the appropriate line to comment out in the driver this time (how I did it in 8.04 is archived in that Ubuntu bug). (ETA: New HP NC6220 sound suspend bug for Ubuntu 10.04 LTS. ETA, 2010-07-04: Appears fixed by linux-image-2.6.32-23-generic from lucid-updates, although not specifically acknowledged.)

ETA: And now for something different: cosmic ray causes expr to segfault, which also has some useful hints on how to diagnose sudden weird behaviour. (Via Slashdot)