Installing Ubuntu 6.10 (Edgy Eft) on a ThinkPad T60
Created by: Keithvassallo 14:39, 16 December 2006 (CET)
Thanks for valuable contributions by:
Also, thanks to contributions by Malta Linux User Group (http://www.linux.org.mt) members:
- dave abrahams
- Limo Driver
Contents
- 1 Abstract
- 2 My ThinkPad
- 3 Why Ubuntu? (or rather, Why not SUSE?)
- 4 What Works?
- 5 What Doesn't Work? (Known Issues)
- 6 First Things First - Creating a Windows Recovery Disc
- 7 Getting Ubuntu installed
- 8 Wireless LAN
- 9 Non-Intel Network Cards
- 10 Getting the ThinkVantage Buttons to work
- 11 Installing the ATI display drivers
- 12 The Fingerprint Reader
- 13 Bluetooth with Mobile Phones/PDAs
- 14 TrackPoint Scrolling
- 15 Getting Multimedia to Work
- 16 Beryl - fancy 3D desktop
- 17 Problem: Can't add programs to session
- 18 Problem: Virtual terminals not working
- 19 Problem: Microphone doesn't work
- 20 Problem: I don't have any sound!
- 21 Problem: I keep logging out!
- 22 Problem: Hibernate (Suspend to Disk) does not work!
- 23 Desktop envy
- 24 Conclusion
- 25 References
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.
* 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. * Brightness, Volume and Mute with OSD (On-Screen Display). * ThinkLight, TrackPoint II and the touchpad.
What Doesn't Work? (Known Issues)
* FN+F7, FN+F8, FN+F9. * Sending files to Bluetooth devices via GUI. * Suspend to Disk (works with sufficient memory). * Suspend to RAM (though it works on occasions).
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. As for the Bluetooth bug, this is a HAL bug and can only be fixed by a future update. Suspend to Disk and Suspend to RAM are broken apparently due to the ATI drivers. Again, this can only be fixed by ATI.
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.
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!
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.
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:
Purpose | Size | File-System |
Swap | 2 GB | swap |
/boot | 5 GB | ext3 |
/ (root) | 20 GB | ext3 |
/home | 37.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.
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
Click on the box beside 'network-manager' and click 'Mark for installation'. Do the same for 'network-manager-gnome'.
Run:
gksudo gedit /etc/network/interfaces
Save a copy in /etc/network/interfaces.back for backup
After that, remove all line except:
auto lo iface lo inet loopback
and save the file in /etc/network/interfaces
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.
After that use juste network-manger for manage your network!
Non-Intel Network Cards
Not all versions of the T60 have the Intel Wireless LAN as described above. Run the following command to see details about detected wireless cards:
$ lspci
Look for a line which shows detected network cards. Users of Intel network cards will see something similar to the following output:
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
If you see the above, you can jump to the next section. If you do not see the above, your network card is not Intel. You may see something similar to:
03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
If that's the output you get, you're going to have to take some additional steps to get wireless networking working. Read more at http://ubuntuforums.org/showthread.php?t=38972
running:
# dmesg | grep hal
may yield output like this:
[17179590.420000] ath_hal: module license 'Proprietary' taints kernel. [17179590.424000] ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
Which suggests the hardware abstraction layer is in place.
If not, or if the output contains "HAL Status 13" it suggests your card is not supported by the current drivers, and you need to upgrade.
In some cases there is a problem with the mode (a,b,g etc) of the wireless connection. Try
# iwpriv ath0 mode 2
Getting the ThinkVantage Buttons to work
Ubuntu does not recognise all the ThinkVantage buttons correctly by default. This can be fixed quite easily. In a terminal, type:
$ sudo gedit /etc/X11/Xmodmap
Then paste the following in the file:
keycode 234 = XF86Back keycode 233 = XF86Forward keycode 159 = XF86Start keycode 162 = XF86AudioPlay keycode 164 = XF86AudioStop keycode 153 = XF86AudioNext keycode 144 = XF86AudioPrev keycode 227 = XF86LaunchF keycode 249 = XF86ZoomIn
Save and close the file, then logout and back in again. You can now assign the buttons to do anything you want. For example, use the Back and Forward buttons (next the cursor keys) to flip desktops using the cube effect in Beryl (set this using the Beryl settings manager). You can set most of the other keys using Gnome vis System - Preferences - Keyboard Shortcuts.
For the ThinkVantage and Zoom buttons, I used xbindkeys. Open a terminal and type:
$ sudo apt-get install xbindkeys xbindkeys-config
$ xbindkeys --defaults > ~/.xbindkeysrc
$ xbindkeys-config
This will bring up a but-ugly configuration screen. Just click "New" and assign a remark to the new shortcut. Then press "Grab" and press the combination you want (ex: The ThinkVantage button). You can then set the action you want executed in the "Action" field. I made my zoom button open the resolution properties (gnome-display-settings) and ThinkVantage open the Gnome control centre (gnome-control-center).
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
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 | grep usbfs | cut -d':' -f 3
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
# 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
# chmod a+x 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.
If the Sample utility does not work, you may not have the PAM development modules installed. Try this:
# sudo apt-get install libpam0g-dev
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:
$ sudo apt-get install build-essential
$ sudo apt-get install libpam0g-dev
Now, you can compile and install the plugin
$ 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:
$ cd ~
$ sudo bash
This will open a root session. Please do not close this until instructed. Now, paste the following scary command:
SERIAL=`BioAPITest | sed -ne "/Fingerprint/{n;n;s/^.*: \(.\{9\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.*\)/\1-\2-\3-\4-\5/gp}"`
Type the following to register your username and serial with the bioAPI.
# 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
If you like to use the fingerprint reader in the terminal too, you can use the following /etc/pam.d/sudo file instead:
#%PAM-1.0 #@include common-auth auth sufficient pam_unix.so nullok_secure auth required pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/ password required pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/ @include common-account
With this file, you are first asked to provide your password, but you can just press enter and then you will be asked to wipe your finger.
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. NOTE: In case you use Kubuntu KDM won't show you a prompt. Just press Enter instead of a password and then (when the cursor stops blinking) swipe your finger.
Bluetooth with Mobile Phones/PDAs
Rather strangely, Ubuntu seems to have taken a step backwards with Bluetooth usability in Edgy. What worked out of the box with Dapper, now requires configuration. First, open System - Preferences - Sessions and go to the Startup Programs tab. Then, find the entry labeled '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 until 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.
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- | sudo apt-key add -
$ wget http://www.getautomatix.com/apt/key.gpg.asc
$ gpg --import key.gpg.asc
$ gpg --export --armor 521A9C7C | sudo apt-key add -
$ 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.
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://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
$ 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 cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)" xauth -i add :1 . "$cookie" 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!
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: Microphone doesn't work
On my system, I could get the microphone to work by simply un-muting the correct channels using alsamixer. To do this, open the ALSA mixer GUI form a terminal:
$ alsamixer
The alsamixer GUI will be displayed:
Now make sure all outputs are un-muted. Scroll through the outputs using the LEFT and RIGHT arrow keys, and press M to un-mute a channel (muted channels show an MM symbol). Use the UP and DOWN arrow keys to raise and lower the volume for each channel. Press TAB to switch to capture settings. Select Mic and press SPACE to enable the microphone. Now enable microphone capture my selecting Capture, and pressing SPACE. Depending on your microphone, you may need to enable MIC boost to get some extra umph from your sound input.
The volume of the input channels depends on your microphone. These settings worked best for me on a desktop microphone:
- MIC: 71
- MIC Boost: 33
- Capture: 73
Now test the microphone by going to Applications - Sound & Video - Sound Recorder and select "Capture" in the "Record from input" field. On my system, mixing worked too - meaning I could play games whilst talking on TeamSpeak or Skype.
After following the above steps, your microphone may still not work, which appears to be linked to the a missing file /etc/asound.names. Executing
$ sudo alsactl names
$ sudo alsactl store
to generate /etc/asound.names and /var/lib/alsa/asound.state seems to fix sound problems.
Problem: I don't have any sound!
If Ubuntu seems to recognize your sound-card (82801G ICH7) but still cannot initialize it (so you don't hear a thing), you have most probably turned the modem off in the system-bios. If you turn it on again, it should work again. If you don't want to do that this might help you.
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)'.
Problem: Hibernate (Suspend to Disk) does not work!
It was possible on some machines to get hibernate working by installing the hibernate script. However, when too many programs where open I got a "Not enough memory" error. You will have to try it.
To install the script type
$ sudo apt-get install hibernate
To go to hibernate type
$ sudo hibernate
The computer will go to hibernate and turn off. To switch it on again, you will have to press the power button. It will boot and restore the system as you left it.
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 * Atheros network cards on Ubuntu - http://ubuntuforums.org/showthread.php?t=38972 * Enabling the microphone - http://ubuntu.wordpress.com/2005/12/05/fixing-the-errant-microphone/ * Enabling the microphone (2) - http://ubuntuforums.org/showthread.php?t=272166