The Dell Latitude D630 laptop and linux

In 2008 it was time for a new work laptop. The standard choice was a Dell Latitude D630 and that sounded good for me.

Stuff here:

The distro

I chose Ubuntu linux this time because I wanted to give it a try. It uses a lot of parts from Debian, so I can still type apt-get update but a lot more is automated.

I burned an Ubuntu 8.04 desktop cd and went through the installation. Not a lot of questions were asked, a lot is automated. Even firmware drivers for hardware are offered for installation.

Not using gnome

Gnome is nice but I like my fvwm window manager and personal keyboard shortcuts. So I created a personal account koos for normal work and an account gkoos for fast access to all the tools available for gnome users. Account koos has an .xsession file which starts some basic tools and has an exec fwvm at the end.

I can use the gdm user switching feature: just type the command gdmflexiserver. I learned this from the xscreensaver documentation.

gnome-keyring-daemon and ssh-agent

I noticed when adding ssh-keys with a specified lifetime that the lifetime was not honored by what I thought was the ssh-agent:
koos@machiavelli:~$ ssh-add -t 1800
Enter passphrase for /home/koos/.ssh/id_dsa: 
SSH_AGENT_FAILURE
Identity added: /home/koos/.ssh/id_dsa (/home/koos/.ssh/id_dsa)
I found out after some searching that this is actually gnome-keyring-manager doing this and this is a kwown bug: gnome-keyring-daemon does not honor constrained ssh identities. I like my ssh identities constrained. Fix found via Marcus Brinkmann in GnomeKeyring overrides gpg-agent :
$ gconftool-2 --set -t bool /apps/gnome-keyring/daemon-components/ssh false
Now ssh-agent (from seahorse-agent) gets started automatically.

NetworkManager and wireless

NetworkManager is nice, but it can't deal with the 802.1x wireless network at work. So I switched the control of the wireless card to wpa_supplicant using the following stanza in /etc/network/interfaces:
iface wlan0 inet dhcp
        wpa-conf /etc/wpa_supplicant.conf
The configuration for UU networks such as SOLIS-AIR is still the same as I documented before via entries in /etc/wpa_supplicant.conf. So the gnome network manager applet switched from all autoconfiguration to just the option Manual configuration... I run ifplugd on the wired network to make it automatically start dhcp when a cable is plugged in.

No beep

I noticed my xterms don't beep, even when enabling audible bell. Nothing. The pcspkr module is loaded. Seems to be a known bug: Bug#460410: alsa-base: snd_hda_intel for SigmaTel STAC9205 kills beeper speaker on dell laptop

Bluetooth communications with the mobile phone

The laptop was ordered with built-in Bluetooth, seen in the usb listing as:
Bus 001 Device 010: ID 413c:8140 Dell Computer Corp. 
The driver hci_usb recognizes this chip. The rest of making this work is documented in Nokia 6300 phone and Linux.

Nomadic printing using cups

I tried creating a printer class 'mydefault' and adding my preferred printers at home and at work to it so printing to 'mydefault' would select the available printer. This trick did not work, printing to 'mydefault' would just make the jobs stay in the queue for a long time and moving them to the queue with an available printer made them come out with the wrong papersize settings.

Smartcard slot

The Dell D630 has a smartcard slot, acting like an usb device:
Bus 007 Device 098: ID 0b97:7761 O2 Micro, Inc. 
The pcsc suite recognizes the reader and can use it:
koos@machiavelli:~/smartcard$ pcsc_scan 
PC/SC device scanner
V 1.4.11 (c) 2001-2007, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.4.4
Scanning present readers
0: O2 Micro Oz776 00 00

Thu Feb 12 15:19:50 2009
 Reader 0: O2 Micro Oz776 00 00
  Card state: Card removed, 

Thu Feb 12 15:20:04 2009
 Reader 0: O2 Micro Oz776 00 00
  Card state: Card inserted, 
  ATR: 3B 67 00 00 29 20 00 6F 78 90 00

ATR: 3B 67 00 00 29 20 00 6F 78 90 00
+ TS = 3B --> Direct Convention
+ T0 = 67, Y(1): 0110, K: 7 (historical bytes)
  TB(1) = 00 --> VPP is not electrically connected
  TC(1) = 00 --> Extra guard time: 0
+ Historical bytes: 29 20 00 6F 78 90 00
  Category indicator byte: 29 (proprietary format)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 67 00 00 29 20 00 6F 78 90 00
        Postbank Chippas (chipknip) Netherlands

Talking with my palm

I made the Palm Tungsten E2 and the laptop talk: PPP over bluetooth, using information from Palm & Linux Bluetooth - Tills Palm Pages.

Change the following in /etc/default/bluetooth :

#
# Run dund -- this allows ppp logins. 1 for enabled, 0 for disabled.
DUND_ENABLED=1

# Arguments to dund: defaults to acting as a server
DUND_OPTIONS="--listen --persist call dun"
The call dun at the end is passed to pppd so I added /etc/ppp/peers/dun with :
debug
57600
#proxyarp
192.168.168.1:192.168.168.50
local
ms-dns 10.42.2.1
noauth
ktune
And I set up IP masquerading:
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
And I added the "LAN Access Using PPP" (0x1102) service on the laptop:
$ sdptool add LAN
This should happen automatically with the right entries in /etc/default/bluetooth but it does not.

Success.. after a number of tries. I kept seeing the error Error: Serial: timed out. could be bad cable or faulty Modem, (0x0305) on the palm and pppd not even starting or dund not even being called on the laptop. Solution: reboot! I hate this windows solution but sometimes it is needed. Works: I can browse the web!

Audio buttons

I wanted the volume down/up/mute buttons on the laptop to work (especially after playing a loud noise in the middle of some else's presentation..). The infrastructure to convert the acpi events to keypresses is there:
root@machiavelli:/etc/acpi# cat mutebtn.sh 
#!/bin/sh
. /usr/share/acpi-support/key-constants
acpi_fakekey $KEY_MUTE
And so on for KEY_VOLUMEDOWN and KEY_VOLUMEUP. Using xev I saw the keys fly along, but I needed to convert them to something for fvwm, so I added to .Xmodmap :
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
(this has to be done before fvwm starts, otherwise fvwm will complain about the unknown keys). My .fvwm2rc now contains:
Key XF86AudioLowerVolume A      N       Exec exec amixer set Master 10%- > /dev/null
Key XF86AudioRaiseVolume A      N       Exec exec amixer set Master 10%+ > /dev/null
key XF86AudioMute        A      N       Exec exec amixer -q set Master toggle > /dev/null
Redirection to /dev/null to make sure my .xsession-errors isn't filled with those events.
Comments about this page and updates are welcome. E-mail is the preferred contact method.
Koos van den Hout
Other webprojects: Camp Wireless, wireless Internet access at campsites The Virtual Bookcase