Installing Ubuntu Linux on a Dell Vostro V13

I recently bought a Dell Vostro V13 laptop and installed Ubuntu Linux 10.10 (64-bit) on it. Along the way, I ran into a few problems, and thought others might benefit from hearing about my experience.

In March 2011, I was looking for a new primary compute platform. For many years (decades even), I’ve been using a Mac, and for the past several years, my primary computer has been a MacBook running Mac OS X 10.4, but the hard drive was maxing out, and I didn’t want to spend the $100+ to upgrade to 10.6 (or pay again for the next upgrade, and so on). I used my MacBook for both personal and business uses. With regards to business uses, I teach physics at a small Christian liberal arts college, and am also a climate dynamicist, and so I need something that will handle standard office productivity tasks (e.g., word processing, spreadsheets, presentations) and can also be used for standard scientific computing tasks (e.g., visualization, data analysis, modeling, etc.). With regards to personal uses, besides office productivity, I mainly use my Mac for web surfing, syncing my Palm Zire (yes, very old school), and managing my mp3s and books (via Delicious Library).

Since I already use C-shell to do many of my everyday tasks, including email (I use mutt) and writing documents that are more than a page long (I use vim coupled with LaTeX), I thought now might be the time to take the plunge and transfer everything from Mac to Linux. Ubuntu was the no-brainer distribution, but narrowing down the hardware was more difficult. Eventually, I chose the the Dell Vostro V13 laptop (Intel Core Duo, 64 bit, 2 GB RAM) for its price (around $350) and also because it is Ubuntu Certified for 10.10. Other Dell laptops are also Certified, but only with the pre-installed version of Ubuntu; I wanted future Linux upgrades to have the most chance of working fine on my new laptop. (Note that the certification says you need to select the Broadcom STA driver. However, I haven’t encountered a situation yet where I was prompted to do so.)

I decided to forgo buying an external DVD drive (the V13 doesn’t come with one) choosing instead of install Ubuntu via USB. Since the V13 came with Windows 7, I used Pendrivelinux.com’s USB installer running in Windows (as per the Ubuntu download instructions). Creating the USB install key wasn’t that difficult, but for hours I couldn’t get Ubuntu to install: it would get stuck relatively early in the process (like around the keyboard setting phase) and refuse to go on. I tried different versions of Ubuntu, and 32 instead of 64-bit, but to no avail. Finally, I switched USB sticks: instead of the 4 GB Kingston DataTraveler 101 Gen 2 I was using, I changed to a 1 GB no-name USB stick my wife received as swag at some industry conference. And voila, 64-bit Ubuntu 10.10 installed without any problems. Weird.

I used Synaptic to do a full upgrade of the packages that were already installed, and to install aptitude and ecryptfs-utils. I decided to use the ecryptfs to encrypt my home directory for security, in case someone steals my laptop. I also encrypted my swap space, to prevent someone from circumventing the encryption on my home directory. This was pretty easy to do:

sudo adduser --encrypt-home username
sudo ecryptfs-setup-swap

where username is the username of the account I wanted encrypted. Note that one bug with Ubuntu is that once you encrypt swap, you cannot go from hibernate to resume. As a result, I set the Power Management features for all accounts on my computer to go into suspend mode, instead of hibernate, after some downtime, to prevent this problem.

Now that I had my user accounts all set up, I installed the packages I needed to do my teaching and research. I prefer to use aptitude since I find the command-line interface easier to use than the Synaptic GUI (at least for installing individual packages). Here are the commands I executed:

sudo aptitude update
sudo aptitude install mutt
sudo aptitude install msmtp
sudo aptitude install vim
sudo aptitude install tcsh
sudo aptitude install texlive
sudo aptitude install texlive-math-extra
sudo aptitude install python
sudo aptitude install python-matplotlib
sudo aptitude install python-scipy
sudo aptitude install python-scientific
sudo aptitude install cpp
sudo aptitude install gcc
sudo aptitude install gfortran
sudo aptitude install subversion
sudo aptitude install latex2html
sudo aptitude install python-epydoc
sudo aptitude install cryptsetup
sudo aptitude install skype

Note, however, I did have to enable the Canonical Partner Repository in Synaptic (both normal and source code), to permit me to install skype using aptitude.

With my platform more or less set up, I brought over the files from my Mac. I decided to do this mostly using tar, a few major directories at a time, but I’d guess you can use other methods (e.g., GUI drag and drop, rsync). In the process, one big issue I did discover is that ecryptfs, in its default installation mode, will encrypt filenames. However, because Linux filenames are limited to 256 characters (which includes the full path), and filename encryption requires padding of around 50-60 characters, if your filename is longer than around 200 characters, the file cannot be copied to the encrypted filesystem (see here and here). Thus, I had to write a Python script to find all files that had filenames longer than around 200 characters (in retrospect, I’d look for filenames longer than 180 characters, because the first few directories of the path will likely change when you move the tar file to the final destination directory) and shorten the filenames that exceeded the threshold. The Python script isn’t hard, if you use os.walk; here’s code that will print out the full pathnames of every file:

import os
for dirpath, dirnames, filenames in os.walk(os.curdir):
    if len(filenames) > 0:
        for ifn in filenames:
            print os.path.join(dirpath, ifn)

For a firewall, I used Uncomplicated Firewall (UFW), which is the default firewall for Ubuntu. Here’s the code I used to activate it (I’ve locked down all ports):

sudo ufw default deny
sudo ufw enable

That’s basically all the important things I needed to do. Everything seems to work pretty well. OpenOffice handles most of the Word/Excel files that I have (and that others send me) with fairly minor formatting changes; Powerpoint is another story, with some files requiring me to do major changes in order to restore the original formatting, but OpenOffice Impress does a better job than my first experience with it some six years ago.

Other minor issues I encountered or relatively minor aspects of the installation and configuration process I went through:

(1) If I abort the System Testing utility by not entering in the administrator’s password, it freezes. This appears to be not uncommon.

(2) On my backup disks, I created encrypted ext4 (the default Ubuntu 10.10 filesystem) partitions. This was easy enough to do using Disk Utility. Note, however, that when you have an encrypted partition, you have to decrypt the partition, then mount it. Double-clicking the encrypted filesystem icon under Gnome, and entering the password when prompted, will do both steps, but you’ll have to do each step manually if you’re in Disk Utility.

(3) If you’re new to aptitude as a package manager, here’s the command I execute to keep my packages up-to-date:

sudo aptitude update && sudo aptitude safe-upgrade

The man page gives more details. I guess I should use the Ubuntu Software Center now, but old habits die hard.

(4) I created a softlink for /home/username called /Users/username, to enable links from my Mac to work that assumed the home directory began with /Users. For some reason that I don’t know why, however, I am unable to change the permissions nor the owner:group
for the softlink. I did some testing to check that the softlink does not compromise the encryption of /home/username.

Bottom line: I like my new environment, and am surprised how much I used to do on my Mac I can do on my Vostro. All in all, even given the hassle in doing the installation and move, it’s been worth the savings in hardware and the future savings for OS updates.

April 26, 2011 Update: My Vostro still works well, but a few minor issues have popped up:

  • After I plug in an external keyboard with the Num Lock on, shutdown, disconnect the external keyboard, and bring the computer back up, sometimes it will come up assuming the Num Lock is activated. This is a problem if I’m using the laptop keyboard, since the numeric pad uses alphabetic keys. The fix is easy—turn off the Num Lock on the laptop—but may come as a surprise.
  • Switching to and from an external monitor is not as smooth as with my MacBook. Sometimes, I have to shutdown, plug/unplug the monitor, and bring the Vostro back up, in order for the monitor to be recognized correctly. Pressing the monitor-related Fn command on the laptop keyboard doesn’t always help.
  • My speaker has static. It’s probably a bad speaker or a loose wire/connection somewhere, but it’s not worth me paying to ship the computer to fix since it was only $350 to begin with.
  • Skype has some issues, and I often have to kill it using kill -9, but then again it’s still in beta for Linux.

February 6, 2012 Update: Just upgraded to Ubuntu 11.10 (Oneiric Ocelot) on my V13. Seems to be working okay, but here are a few minor issues and what I did to fix it:

  • After reboot, I logged in as system administrator and the mouse seemed to stop working (the cursor froze). I restarted and everything seemed to work fine.
  • There isn’t an Ubuntu Classic option available at the login screen, so I had to install the gnome-session-fallback package (see here) using aptitude.
  • I installed GNOME Tweak Tool (see here) because I wanted to be able to configure my windowing theme.
  • All the application icons I installed in the topbar of my desktop have disappeared. There is a way to fix this, but I’m probably going to just change my workflow habits instead of doing the fix. I will, however, install GNOME Shell.
  • In the file manager, I have this memory that I could rename a file by selecting Rename, changing the name, then clicking outside the name field (maybe my memory is all messed up). Now, it appears you need to press Enter in order for the change to take (here’s the manual entry for this).
  • I started having problems with LibreOffice not being able to open my Impress presentations. Eventually I found out that the Oneiric version of LibreOffice was trying to find my user-defined/downloaded presentation templates in ~/.libreoffice/3/user/template/Presentations instead of ~/.libreoffice/3/user/template. The fix was to make softlinks in the Presentations sub-directory to the .otp templates in the parent directory.

April 28, 2012 Update: Just upgraded to Ubuntu 12.04 (Precise Pangolin) on my V13. The one big issue with the upgrade is that during the ttf-mscorefonts-installer installation, my computer couldn’t find the files at Sourceforge and so stalled for hours. After letting it go overnight, with no resolution, I killed the download process (or at least I hope that’s what I killed) following someone who had a similar problem. I didn’t have htop installed so I used pstree -l -p instead. The install completed, but I still sometimes get an error message when I run Update Manager (even though I’ve reinstalled it) in my administrator account. I prefer using Synaptic anyhow, and don’t use my administrator account very often, so this shouldn’t be a problem, but I’m hoping this will be fixed in a future update. Other than that, the installation seems to be working okay. Haven’t noticed any real difference in performance that one reviewer I read found. My main reason for upgrading was to install the basemap package for matplotlib using the package manager instead of having to build it from source.