Installing Ubuntu 6.10 (Edgy Eft) on a ThinkPad T60

From ThinkWiki
Revision as of 08:03, 20 December 2006 by Ischg (Talk | contribs) (The fingerprint reader)
Jump to: navigation, search

Keithvassallo 14:39, 16 December 2006 (CET)

Abstract

This article describes how to get Ubuntu Linux 6.10 (Edgy) installed on an IBM/Lenovo ThinkPad T60. It's not meant to be a definite guide to installing Ubuntu (the Ubuntu Guide at http://www.ubuntuguide.org does a very good job of that). This article is meant to describe how to get most of the ThinkPad features working on Ubuntu system. It also discusses how to get Multimedia, some cool-looking effects such as Beryl, gDesklets and similar working on Ubuntu. Finally, we discuss some common problems encountered on Ubuntu and ThinkPads alike.

My ThinkPad

Although this guide should work on most recent ThinkPads, I cannot guarantee that. These are the specifications of my machine. The closer your specs are, the greater the chance of success.

Figure 1. ThinkPad T60 2007, complete with Tux sticker :-)
Thinkpad.jpg
   * Lenovo ThinkPad T60 2007.
   * Intel Centrino Duo T2400 / 1.83 GHz.
   * Mobile Intel 945PM Express Chipset.
   * Intel Wireless LAN.
   * Integrated Bluetooth.
   * ATI Mobility Radeon X1400 - PCI Express x16, 128MB dedicated RAM.
   * 100 GB - Serial ATA-150 Hard Drive.
   * 15' TFT Active Matrix Display (1400x1050).

That's basically all you need to know. As far as I know, all other features are common to all ThinkPads manufactured by Lenovo since they acquired IBM's computer business.

Why Ubuntu? (or rather, Why not SUSE?)

In June 2006, Lenovo announced it would be shipping ThinkPad T60p laptops with SUSE Linux Enterprise Desktop (SLED) 10 pre-installed, since SLED apparently supports all of the features of the T60p. I contacted my local IBM supplier, who said that Lenovo were no longer manufacturing the T60p, since the company which was making the displays went out of business. This meant I could not get a T60p with SLED pre-installed. I decided to go for the T60 2007, which is the closest thing I could find to the T60p. This comes with Windows XP Professional pre-installed.

I first tried to get SLED installed on the T60. Although it did indeed install, and most features worked, I soon got bored of SLED. Firstly, SLED uses Gnome 2.12, which is by now ancient. Secondly, although the Lenovo utilities do work on SLED, they only work well if you use KDE as your defauly desktop environment, which is a pity since I'm a Gnome user. The utilities were very unstable to me too. Finally, what made me give up SLED was the usual problem - it's an RPM based distribution. Once you start using Debian derivatives, with their apt based installer, you won't want to go back. That's when I decided to try Ubuntu, and have not regretted it since.

What Works?

   * Ubuntu and all programs it comes with.
   * Most of the function keys, except the ones mentioned below
   * The fingerprint reader.
   * The ATI proprietary graphics drivers.
   * Suspend to RAM (Sleep) and Suspend to Disk (Hibernate).
   * Brightness, Volume and Mute with OSD (On-Screen Display).
   * ThinkLight, TrackPoint II and the touchpad.

What Doesn't Work? (Known Issues)

   * FN+F8, FN+F9, FN+ZOOM.
   * The BACK and FORWARD buttons (next to the cursor keys).
   * The ThinkVantage button (in Linux, still works on boot).
   * Sending files to Bluetooth devices via GUI.

There are probably ways and means to get the offending buttons to work, I've tried several fora but none seem to address my exact problem. I'll update this article should I find out anything.

First Things First - Creating a Windows Recovery Disc

If you've purchased a T60, chances are it came with Windows XP Professional. The other option is for you to have FreeDOS installed, in which case you can skip this section. You could remove the Windows partition altogether, and reserve your ThinkPad for Linux, but that's not the route I've chosen. The ThinkVantage utilities in Windows allow you to do a lot of cool things, such as set-up a boot-up fingerprint security scan. You can't do this from Linux (as far as I know) so it's best to leave the Windows partition in place. So, boot your ThinkPad and complete the Windows XP setup (which asks you to add a user account and enroll yourself using the ThinkVantage Client Security Solution). While you're there, use the ThinkVantage productivy centre to enroll your fingerprint (I suggest enrolling more than one) and make sure you check the option to require a fingerprint scan on boot (not for security, for geek points). When you reboot, press ESC or F2 to get to BIOS, and make sure you check the option to require a supervisor password. This will make your ThinkPad prompt you for your fingerprint when you power it up.

Figure 2. Configuring fingerprint security from Windows
Winprint.jpg

Now that's working, you should create a recovery DVD using the ThinkVantage recovery utilities. This will allow you to recover your Windows installation should you manage to screw your partitions up in the following stages. I highly recommend you do this, as Lenovo does not provide Windows XP CDs with this Laptop - so the hard disk partition is all you've got. Once this is done, we're ready to install Ubuntu!

Figure 3. Creating recovery discs from Windows
Recovery.jpg

Getting Ubuntu installed

Download the latest Edgy live CD from the Ubuntu website, you can find a list of mirrors at http://www.ubuntu.com/products/GetUbuntu/download#currentrelease. You may also try Kubuntu, Edubuntu or any of it's derivatives, but I'll stick with Ubuntu here for simplicity's sake. Once that's downloaded, burn the ISO to disc using any program of your choice (If this is your first Linux experience and you're using Windows, try using Nero - http://www.nero.com).

Once the burning process is complete, reboot your machine ensuring that the Ubuntu CD is in the drive. You should see an Ubuntu menu. If you don't, your BIOS is not set to boot from CD. Reboot your ThinkPad and change the boot order from BIOS (by default ThinkPads boot from CD-ROM before the hard disk, so this is probably not necessary). Once the menu shows up, select 'Start or install Ubuntu' and let it boot. This will take a while as everything is loaded from CD. You should eventually end up in a Gnome desktop. If you see an error about the Gnome Settings Daemon not being able to load, simply ignore it, as this is not necessary for now. For the purposes of the installation, it's best if you have a wired ethernet connection, as it's unlikely the wireless network card will work until we boot into our installed Ubuntu system.

Figure 4. Select the first option to start Ubuntu
Boot.jpg

Double-Click on the 'install' icon on the Desktop to start installation. The installation should be pretty straight-forward. If you need additional help, check out the walk-through with screen-shots at http://www.debianadmin.com/ubuntu-edgy-eft-desktop-installation-with-screenshots.html. The only stage at which we need to make changes is the partitioning stage. This to make sure we preserve our Windows partition, and the IBM vendor_diag partition which allows recovery of the laptop when things go hay-wire. In the 'Prepare disk space' section of the installer, select the third option, 'Manually edit partition table'. A bar will be displayed showing your existing partitions. If you have Windows installed you will see two partitions. The first is a 4.89 GB IBM Vendor Diagnostic partition, which we do not want to touch. The second will be your Windows partition, which will fill the rest of the disk. Click on this partition, Then click the 'Resize/Move' button. I resized my Windows partition to 24 GB. This is enough to accommodate the 10 GB already in use on that partition, as well as giving Windows another 14 GB of free space. 6 GB of free space would probably be enough though.

Now it's time to create partitions for Linux. You need at least two partitions; a swap partition which should be roughly double the amount of RAM you have, and a root partition to install Linux. I opted for four partitions, as follows:

PurposeSizeFile-System
Swap2 GBswap
/boot5 GBext3
/ (root)20 GBext3
/home37.25 GB (what's left of the disk)ext3

To create these paritions, click on the 'New' button and select 'Extended Partition' in the 'create as' drop-down list. Leave all other settings as-is, and click 'Add'. Now, click on the newly created partition, and create each of the partitions you want to create, simply specify the size of the partition in the 'New Size (MiB)' text box. To convert GB to MiB, multiply by 1024. So for your swap partition you should specify a size of 2048. Repeat until you have created all the required partitions. If you follow my parition layout, the partition editor should look something like Figure 5.

Figure 5. Our partitions, ready to be created
Partitioning.jpg

You will not see mount-points in your diagram, because the screen-shot above was taken after they were assigned, but you should get the general idea. After this screen, you will be asked to assign mount-points to the partitions you have just created. If you created the partitions in the same order I did, you can assign mount points as I have (i.e. /dev/sda5 for swap, /dev/sda6 for /boot, /dev/sda7 for /, /dev/sda8 for /home). Additionally, I mounted my Windows partition as /media/sda1 and my IBM Vendor Diagnostic partition as /media/sda2. These are optional. After this step, continue installation as normal. When the installation is complete, click the 'reboot' button to restart into your fresh Ubuntu System.

When booting, the GRUB boot-loader will be displayed, asking you what you want to load. You will probably see four options. The first two being Ubuntu Linux and Ubuntu Linux recovery mode (showing the kernel version). The other two will be Microsoft Windows XP, and 'Other Windows XP/2000/NT' partition. This is your IBM Vendor Diagnostic partition, which is based on the Windows kernel, apparently. Select the first entry to boot Ubuntu. The next time you boot Windows, it will bring up a chkdsk screen. This is entirely normal and happens because we have resized the Windows partition. Make sure you do not skip this check and let it complete.

Wireless LAN

The first thing we should do is to get wireless networking working. Luckily, getting the Centrino wireless LAN chip working in Ubuntu is quite easy, if you use the gnome-network-manager applet. Just go to System - Administration - Synaptic Package Manager. Then click 'Search' and set the 'look-in' field to 'name'. In the 'Search' text box type:

network-manager
Figure 6. Installing the network manager applet
Networkmanager.jpg

Click on the box beside 'network-manager' and click 'Mark for installation'. Do the same for 'network-manager-gnome'. Once installed, reboot your thinkpad. An applet will show up in the gnome notification area. Click on it, and a list of detected wireless networks will be displayed. Simply click on one of them, enter any authentication details necessary, and you'll be connected to the wireless network.

Figure 7. gnome-network-manager showing available wireless networks
Available-accesspoints.jpg

Note! Not all versions of the T60 has the Intel Wireless LAN as described above. Run lspci from the command line and look for details of your wifi card. E.g.:

03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

suggest you have a different wifi card. Read this forum thread http://ubuntuforums.org/showthread.php?t=38972

running:

  1. dmesg | grep hal

may yield output like this, which apparently suggests the hardware abstraction layer is in place. [17179590.420000] ath_hal: module license 'Proprietary' taints kernel. [17179590.424000] ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

If not, or if the output contains "HAL Status 13" it apparently suggests your card is not supported by the current drivers, and you need to upgrade.

Installing the ATI display drivers

If your ThinkPad has an Intel graphics adapter, you should skip this section as Ubuntu installs the best driver automatically. Ubuntu does not install the ATI proprietary drivers by default because they are, er, proprietary. Luckily, installing them is easy enough. Open a terminal (Applications - Accessories - Terminal) and type the following:

$ sudo apt-get update
$ sudo apt-get install xorg-driver-fglrx fglrx-control

Now we make sure the proprietary driver is not disabled by the kernel. Type the following, and remove any lines referring to fglrx

$ sudo gedit /etc/default/linux-restricted-modules-common

An alternative to gedit (Gnome) is nano (sudo nano -w /etc...) for a CLI editor.

Finally, we need to configure the X server to use the ATI drivers. Type the following:

$ sudo depmod -a
$ sudo aticonfig --initial
$ sudo aticonfig --overlay-type=Xv

One last thing. In order to correct a very common problem of getting a jerky video display, type the following:

$ sudo gedit /etc/X11/xorg.conf

Scroll to the end of the file, and add the text below.

Section "Extensions"
    Option    "Composite"  "0"
EndSection

Save the file and exit. Now, to apply the changes either press CTRL+ALT+Backspace or reboot. The resolution should have switched to 1400x1050 and everything should look prettier and render faster. Just to make sure everything is working, open up a terminal and type

$ fglrxinfo

This should display:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1400 Generic
OpenGL version string: 2.0.6011 (8.28.8)

The above is what I get on my ThinkPad, and you should see something similar. As long as you see your graphics card model listed, everything should be OK. If, instead, you see a bunch of lines containing 'Mesa' then you have a problem. In that case, I recommend consulting https://help.ubuntu.com/community/BinaryDriverHowto/ATI and the Ubuntu forums at http://ubuntuforums.org

The fingerprint reader

Although IBM does not officially support it, the fingerprint reader does in fact work with most Linux distributions. Getting it to work with Ubuntu can be a bit of a pain, but it does work. Basically, a bioAPI plugin is provided for PAM. PAM-aware applications such as GDM and gnome-screensaver will then automatically use the fingerprint reader, which is uber cool. Anyway, enough theory, I've probably lost the newbies amongst you already. Go to http://www.qrivy.net/~michael/temp/ and download the latest bioapi package (at the time of writing, bioapi_1.2.3_i386.deb). When asked, tell Firefox to open the file with the GDebi package installer.

That will install bioAPI. What we need now is the driver for our fingerprint device, which is manufactured by UPEK. Go to http://www.upek.com/support/dl_linux_bsp.asp and download the latest version, currently UPEK_BSP_LIN_1.0.zip. Extract this file, then open a terminal (and don't close it until I say so).

$ cd /path/to/where/you/extracted/the/file
$ sudo bash
# sh install.sh /usr/lib

Now we need to assign the right permissions so non-root applications can use the driver:

# addgroup --system bioapi
# addgroup --system usbfs
# adduser yourusername bioapi
# adduser yourusername usbfs
# chown -R root:bioapi /usr/var/bioapi/
# chmod -R 770 /usr/var/bioapi/
# chown -R root:usbfs /proc/bus/usb
# chmod -R g+X /proc/bus/usb

Of course, replace 'yourusername' with the username you use to login. Now, we need to set the usb file system (usbfs) to be usable by users in the usbfs group. To do this, we need to determine the group ID of the usbfs group. Type the following:

# cat /etc/group

In my case the number is 116, it might be different for you. Now, open the file /etc/fstab:

# gedit /etc/fstab

and type the following:

none /proc/bus/usb usbfs defaults,devgid=116,devmode=0660,busgid=116,busmode=0770,listgid=116,listmode=0660 0 0

Please type the above code in one line in your file. Remember to replace 116 if you got a different number with the previous cat command. The last permission-related thing we need to fool around with is UDEV. Open the udev permissions file

{{cmdroot|gedit /etc/udev/rules.d/40-permissions.rules}

and find the line:

SUBSYSTEM=="usb_device",		MODE="0664"

It's line 65 in my file. Change it so it looks like this:

SUBSYSTEM=="usb_device", MODE="0660", GROUP="usbfs"

Now we need to enroll our fingerprint with the system. To do this, we need a utility called Sample, which is only distributed in source-code form with the driver. This is great, only I couldn't get it to compile on Ubuntu. Luckily, there is a binary version available from one of the earlier releases of the driver (beta 2). To get this, download it from ftp://linux:Tuc-nak3@delta.upek.com/TFMESS_BSP_LIN_1.0beta2.zip. Now, extract the file and type:

# cd /path/to/where/you/extracted/the/archive
# cd NonGUI_sample
# ./Sample

Press (e) to enroll a new user, and enter your username when asked for the user ID. You will be asked to swipe your finger three times. Now press (v) and swipe your finger, a green check should be displayed showing you have successfully authenticated.

Figure 8. The fingerprint swipe prompt
Touchchip.jpg

Wonderful! Now, quit the application (q) and type exit to become a normal user. A file called yourusername.bir should have been created, copy this to your home directory:

# cp yourusername.bir /home/yourusername/

You can now close the terminal window. The next step is to install the BioAPI plug-in for PAM, and to make applications use the plugin. So, get the pam_bioapi plugin from http://www.nax.cz/pub/bioapi/pam_bioapi/pam-bioapi_0.3.0.tar.gz and extract it. Now open a terminal and type:

$ cd /path/to/where/you/extracted/the/arcive
$ ./configure --libdir=/lib --enable-file-store && make
$ sudo make install

That's installed the plugin. Now, open a terminal and type the following scary commands: (Note: The line starting 'SERIAL=' and the line following it should be in the same line).

$ cd ~
$ sudo bash
# sed -ne "/Fingerprint/{n;n;s/^.*: \(.\{9\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.*\)/\1-\2-\3-\4-\5/gp}"`
# mkdir -p /etc/bioapi/pam/$SERIAL
# cp yourusername.bir /etc/bioapi/pam/$SERIAL
# exit

Phew. Now, to make applications actually use the fingerprint reader. Open a terminal window, and type:

$ sudo gedit /etc/pam.d/common-auth

Delete everything in the file, and paste this instead:

#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
# traditional Unix authentication mechanisms.
#
auth       sufficient pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
password   sufficient pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
auth       required   pam_unix.so nullok_secure

Save and close the file. That will make all PAM-aware applications use the fingerprint reader. Unfortunately, this also includes sudo. Since sudo is a command line application, it will display prompts in a terminal for you to swipe your finger, which is all well and good. The problem with this is that many Ubuntu administrative applications (such as Synaptic) use gksu to present a graphical front-end to sudo, which will output messages on the command line which you'll never see. Result? Administrative programs won't work from the gnome menu. The solution is to make sudo use the good old password. Open a terminal and type:

$ sudo gedit /etc/pam.d/sudo

Delete everything in the file, and instead paste:

#%PAM-1.0

#@include common-auth
auth	required	pam_unix.so nullok_secure
@include common-account

Now, save the file and close it, and reboot your system. GDM will ask you for a username, and then show a pretty prompt where you can scan your fingerprint! Same goes for gnome-screensaver when you set it to lock. Sometimes gnome-screensaver will not display the prompt, but you should still swipe your finger and be able to log back in.

Bluetooth with Mobile Phones/PDAs

Rather strangely, Ubuntu seems to have taken a step backwards with Bluetooth useability in Edgy. What worked out of the box with Dapper, now requires configuratio. First, open System - Preferences - Sessions and go to the Startup Programs tab. Then, find the entry labelled 'bt-applet --sm-disable'. Highlight it and click disable. Click add and in the command field type 'bt-applet'. Repeat this process, adding an entry for 'gnome-obex-server'. Now, open Synaptic Package Manager (System - Administration - Synaptic Package Manager) and click Search. Type 'gnome-bluetooth' to find the package, then mark it for installation. Now repeat this process for 'bluez-passkey-gnome'. Click apply to make changes.

Now that everything is installed, log-out of Gnome and log back in again. From your phone/PDA, search for devices untill you see your ThinkPad (the hostname will be displayed). Pair with the device. When asked for a passkey, enter 1234, which is the default. If you want to change your passkey (and you should), open a terminal and type:

$ sudo gedit /etc/bluetooth/hcid.conf

Find the line which says 'Default PIN for incoming connections' and change the PIN on the line beneath it:

# Default PIN code for incoming connections
passkey "4017";

Save and close the file, then type:

$ sudo /etc/init.d/bluetooth restart

You will now be able to use your new PIN code. To send files from your device to the ThinkPad, simply select the file you want to send and click Send Via Bluetooth (or whatever option your device presents). A dialog will pop-up in Gnome showing you a new file has been received.

Figure 9. Gnome informing us that a file has been received
Bluetooth.jpg

Sending files from your ThinkPad to your device requires more effort. The way it should work is that you right-click on a file, click send to, then make sure 'Bluetooth (OBEX)' is selected. Your device should be displayed and you could just click send. Unfortunately, due to a bug in gnome-bluetooth (described in https://launchpad.net/distros/ubuntu/+source/gnome-bluetooth/+bug/70718) this method does not work. If it does work for you, the bug has been solved and you can skip the rest of this section.

Your only other option is to use the command line to send files to your device. Open a terminal, then type:

$ hcitool scan

A list of detected bluetooth devices will be shown, for example, my output shows the following:

Scanning ...
        00:09:DD:60:02:EB       Photosmart 8100 series
        00:14:A7:99:3C:1F       ThElInK

The first field is the MAC address of the device, the second is the name of the device. In this case my bluetooth printer and mobile phone (ThElInK) were detected. In order to send files to my phone, I use:

$ gnome-obex-send -d 00:14:A7:99:3C:1F myPicture.jpg

Replace the MAC address with that of your device and myPicture.jpg with the file you want to send.

TrackPoint Scrolling

By default you can use the right and bottom edges of your touchpad to scroll through documents. If you use the TrackPoint instad of the touchpad (and believe me, you should), you'll find that scrolling is disabled by default. To enable it, open a terminal and type:

$ sudo gedit /etc/X11/xorg.conf

Now find the entry for your TrackPoint device. In my configuration file, the TrackPoint entry is the first mouse entry, after the keyboard entry, and looks something like this:

Section "InputDevice"
	Identifier  "Configured Mouse"
	Driver      "mouse"
	Option	    "CorePointer"
	Option	    "Device" "/dev/input/mice"
	Option	    "Protocol" "ExplorerPS/2"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "true"
EndSection

Right after this entry is my touchpad entry. My entry is on line 66, but yours may be different. Now, add the follwing two options in that InputDevice section:

  Option       "EmulateWheel" "on"
  Option       "EmulateWheelButton" "2"

Save and exit the file. Restart your ThinkPad (or logout, and press CTRL-ALT-BACKSPACE). You should now be able to scoll by holding down the middle button for your TrackPoint and using the TrackPoint to scroll.

Getting Multimedia to Work

Due to patents and similar legal crap, Ubuntu will not play most media files by default. You also won't get browser plugins for multimedia. Luckily, this is easily fixed. Open a terminal and type the following:

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
$ sudo gedit /etc/apt/sources.list

Delete everything in the file, and instead paste the following:

deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse

## MAJOR BUG FIX UPDATES produced after the final release
deb-src http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse

## UBUNTU SECURITY UPDATES
deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted universe multiverse

## BACKPORTS REPOSITORY (Unsupported.  May contain illegal packages.  Use at own risk.)
#deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse

## PLF REPOSITORY
deb http://packages.freecontrib.org/ubuntu/plf edgy-plf free
deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf free
deb http://packages.freecontrib.org/ubuntu/plf edgy-plf non-free
deb-src http://packages.freecontrib.org/ubuntu/plf edgy-plf non-free
                                                                                                                                         
## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu
## servers. RealPlayer10, Opera, DesktopSecure and more to come.) 
deb http://archive.canonical.com/ubuntu edgy-commercial main

## Listen
#deb http://theli.free.fr/packages/ edgy listen

## Automatix repo
deb http://www.getautomatix.com/apt edgy main

Now, open a terminal and type the following:

$ wget http://packages.freecontrib.org/ubuntu/plf/12B83718.gpg -O-
$ wget http://www.getautomatix.com/apt/key.gpg.asc
$ gpg --import key.gpg.asc
$ gpg --export --armor 521A9C7C
$ sudo apt-get update
$ sudo apt-get install automatix2
$ wget http://easyubuntu.freecontrib.org/files/easyubuntu-3.023.tar.gz
$ tar -zxf easyubuntu-3.023.tar.gz
$ cd easyubuntu
$ cp packagelist-dapper.pot packagelist-edgy.pot
$ cp packagelist-dapper.xml packagelist-edgy.xml
$ sudo python easyubuntu.in

Don't worry if you get errors from the Ubuntu PLF repository. PLF mirrors are about as stable as wild bull in a farm full of cows. Select what you want to install from the resulting window. Make sure you do not select the totem-mozilla plugin, as this just doens't work, for me at least. When EasyUbuntu has finished installing packages, you should be returned to a terminal, which you can close. Now go to Applications - System Tools - Automatix. Read and agree to the warning. Check what you want to install. Make sure you check 'Mplayer and FF plugin'. When ready, click the 'install' button. That should get multimedia working nicely.

Figure 10. The Automatix user interface
Automatix.jpg

Beryl - fancy 3D desktop

MAC OS X has Aqua and Windows Vista has Aero. Well, Linux has XGL/Beryl which can get effects which are as good looking (or sometimes better!) than the former two. Installing Beryl on Ubuntu is not that hard. First, open a terminal and type the following:

$ sudo gedit /etc/apt/sources.list

At the end of the file, append the following:

##Beryl
deb http://ubuntu.beryl-project.org/ edgy main

Save and close the file. Now type:

$ wget http://beryl-mirror.lupine.me.uk/1609B551.gpg -O-
$ sudo apt-get update

ATI Users Only: type

$ sudo apt-get install xserver-xgl

Now, to install beryl:

$ sudo apt-get install beryl emerald-themes

To make Ubuntu use the 3D effects. Open a terminal:

$ sudo gedit /usr/local/bin/startxgl.sh

In that file, paste the following if you use an ATI card:

#!/bin/sh
Xgl -fullscreen :1 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 4  
export DISPLAY=:1 
exec gnome-session

If you use an Intel card, paste the following instead:

#!/bin/sh
beryl-manager
sleep 4
exec gnome-session

Save the file and close. Now we need to make the file executable:

$ sudo chmod a+x /usr/local/bin/startxgl.sh

All that's left now is to create a login script which makes gnome use the 3D effects. In a terminal, type:

$ sudo gedit /usr/share/xsessions/xgl.desktop

Now, in this file paste:

[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application

Save and close the file. Now type:

$ sudo gedit /usr/local/bin/start_beryl.sh

In this file, paste:

#!/bin/bash
#
# Start beryl-manager within gnome-session
#
if [ `ps -A -o comm | grep -c '^Xgl$'` == "1" ]; then
       DISPLAY=:1 beryl-manager
       DISPLAY=:1 beryl-xgl
else echo "${0}: Error: beryl-manager not launched. Xgl not running?"
fi

Now make the file executable:

$ sudo chmod a+x /usr/local/bin/start_beryl.sh

Now go to System - Preferences - Sessions, go to the Startup Programs tab, and click add, then type

$ /usr/local/bin/start_beryl.sh

Now, reboot your ThinkPad. When you come to the login screen, click the 'Sessions' button on the bottom left corner, and select XGL. login, et voila! beautiful 3D effects!

Figure 11. Beryl's Cube effect
Cube.jpg

If you have NetBeans installed, try launching it now. It probably won't work due to Beryl. Luckily, this is easily solved. Open a terminal and type:

$ sudo gedit /etc/environment

Then add the following line to the end of the file.

AWT_TOOLKIT="MToolkit"

Now save, close and reboot. Netbeans should now work!

Problem: Can't add programs to session

So you tried to add something to your startup programs, it shows up in the list, but it doesn't start up. You then launch the sessions program again, only to find your program has disappeared from the list. This problem is being caused by incorrect permissions in your home directory, and can happen on some occasions. To fix it, open a terminal and type the following:

$ sudo chown -R username:usergroup /home/username/.config/

Replace username with your username and usergroup with your group (by default, in Ubuntu your usergroup is the same as your username). Everything should be OK now!

Problem: Virtual terminals not working

One problem I had after installing the ATI drivers was that virtual terminals stopped working. Instead of seeing a console when pressing CTRL+ALT+F1...F6 I was seeing a yellow/orange garbled output. Luckily, solving this with ATI drivers is trivial. Open a terminal, and type:

$ sudo gedit /boot/grub/menu.lst

Find the line which says

#defoptions=quiet splash

and replace it with

#defoptions=quiet splash vga=791

Now, find the line which boots the kernel you are currently using, this is just under '## ## End Default Options ##. In the 'kernel' line, add:

vga=791

Before:

kernel		/vmlinuz-2.6.17-10-generic root=/dev/sda7 ro quiet splash

After:

kernel		/vmlinuz-2.6.17-10-generic root=/dev/sda7 ro quiet splash vga=791

Now save and exit the file, and reboot. Virtual terminals should now work. If you use Intel drivers, you're going to have to bite the bullet and remove the 'splash' keyword from both the defoptions and kernel lines. You'll lose the pretty bootup screen, but at least virtual terminals will work, which are important to recover a crashed system.

Problem: I keep logging out!

If you're using Beryl, and find that you keep getting logged out, you've just encountered one of Beryl's most annoying bugs. Shift+Backspace causes a logout. To fix this, open a terminal and type:

$ gedit /home/username/annoymenot.sh

Remember to replace 'username' with your username. Now, in this file type:

$ xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server"

Save and close the file, and make it executable:

$ chmod 755 /home/username/annoymenot.sh

Now go to System - Preferences - Session, Startup Programs. Click add, and type

$ /home/username/annoymenot.sh

Logout and back in, problem solved! While you're at it, how about getting the start button to work? Go to System - Preferences - Keyboard - Layout Options - Alt/Win Key behaviour and select 'Super is mapped to Win keys (default)'.

Desktop envy

We're living in an age of desktop prettyness, and Linux can be just as pretty as MAC OS X or Vista. You've already got Beryl installed. Now go to Applications - Accesories - gDesklets. If the gDesklets entry is not there, make sure you install it, either using Synaptic or Automatix. Desklets are small programs you can add to your desktop, ala OS X's Deskbar or Vista's Sidebar. To make them start on boot, add gdesklets in System - Preferences - Sessions, Startup Programs.

Another cool program is cairo clock. Download it from http://macslow.thepimp.net/projects/cairo-clock/cairo-clock_0.3.2-1_i386.deb and install it by double-clicking. To make it start automatically, add it to your sessions as mentioned above. I've found the following command makes it work best for me:

cairo-clock -s -w 175 -g 175 -x 1219 -y 7 -t radium

Finally, make sure you click that Ruby icon in your notification area, it allows you to configure Beryl to do all sorts of cool stuff!

Conclusion

Well, that's about it! A dream Linux system on a dream laptop! Check out these cool technologies for an even better system:

   * Beagle
   * Tomboy
   * Deskbar

References

   * ATI on Ubuntu - https://help.ubuntu.com/community/BinaryDriverHowto/ATI
   * Garbled Virtual Terminal Bug - https://launchpad.net/distros/ubuntu/+source/usplash/+bug/63558
   * Beryl logout Bug - http://forum.beryl-project.org/viewtopic.php?p=1295&sid=6feedd09a7f01bca68feb05a5f2f033c
   * Beryl Netbeans Bug - http://ubuntuforums.org/showthread.php?t=252594
   * Beryl on Ubuntu - http://wiki.beryl-project.org/index.php/Install/Ubuntu/Edgy/XGL
   * Home directory permissions bug - http://www.ubuntuforums.org/showthread.php?p=1789997
   * gnome-bluetooth bug - https://launchpad.net/distros/ubuntu/+source/gnome-bluetooth/+bug/70718