2008-08-17

Nice non-antialiased fonts in Linux

Ever since Linux distributions decided to go with antialiased fonts in qt and gtk based applications, I have been looking for a way to go back to the way it used to be (I am talking 1998...). Merely disabling the "antialiased" setting on moden distros produced ugly fonts, unlike the simple, nice Helvetica fonts that 1998-era Linux systems used to have.

However, today I found a site that offers exactly what I wanted: http://www.sharpfonts.com
It describes very easily how to use non-antialiased truetype fonts on a modern Linux distributions.

I ran the described process on a Xubuntu 8.04.1 system. After going through the process described in that site, simply select the Tahoma 8 font with "slight" hinting (for instance) for the desktop font. Works perfectly.

2008-08-02

Nokia 5310 and Linux

In trying to connect a Nokia 5310 to my Linux system (Fedora 9), I encountered some problems which turned out to be non-issues after all. Here's a short report in case it helps anyone:

I don't know if things simply work right "out of the box" when you use Gnome or KDE. I don't use those desktop environments. I work with IceWM for a simple windowing interface, and I like to work from the command line. The following instructions detail what I had to do to access the phone's memory card from the Linux command line.

When I plugged in the Nokia 5310 through its USB port to the computer, the Linux kernel reported the following messages in /var/log/messsages:

kernel: usb 4-2: new full speed USB device using uhci_hcd and address 17
kernel: usb 4-2: configuration #1 chosen from 1 choice
kernel: drivers/usb/class/cdc-acm.c: Ignoring extra header, type -3, length 4
kernel: cdc_acm 4-2:1.1: ttyACM0: USB ACM device
kernel: usb 4-2: bad CDC descriptors
kernel: usb 4-2: bad CDC descriptors
kernel: usb 4-2: New USB device found, idVendor=0421, idProduct=006b
kernel: usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: usb 4-2: Product: Nokia 5310 XpressMusic
kernel: usb 4-2: Manufacturer: Nokia
kernel: usb 4-2: USB disconnect, address 17
kernel: hub 1-0:1.0: unable to enumerate USB device on port 6
kernel: usb 4-2: new full speed USB device using uhci_hcd and address 18
kernel: usb 4-2: configuration #1 chosen from 1 choice
kernel: scsi8 : SCSI emulation for USB Mass Storage devices
kernel: usb 4-2: New USB device found, idVendor=0421, idProduct=006a
kernel: usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 4-2: Product: Nokia 5310 XpressMusic
kernel: usb 4-2: Manufacturer: Nokia
kernel: usb 4-2: SerialNumber: xxxxxxxxxxxxxxx
kernel: scsi 8:0:0:0: Direct-Access Nokia Nokia 5310 Xpres 0000 PQ: 0 ANSI: 4
kernel: sd 8:0:0:0: [sdc] 3932161 512-byte hardware sectors (2013 MB)
kernel: sd 8:0:0:0: [sdc] Write Protect is off
kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
kernel: sd 8:0:0:0: [sdc] 3932161 512-byte hardware sectors (2013 MB)
kernel: sd 8:0:0:0: [sdc] Write Protect is off
kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
kernel: sdc:
kernel: sd 8:0:0:0: [sdc] Attached SCSI removable disk
kernel: sd 8:0:0:0: Attached scsi generic sg3 type 0
kernel: sd 8:0:0:0: [sdc] Sense Key : No Sense [current]
kernel: sd 8:0:0:0: [sdc] Add. Sense: No additional sense information
kernel: sd 8:0:0:0: [sdc] Sense Key : No Sense [current]
kernel: sd 8:0:0:0: [sdc] Add. Sense: No additional sense information
kernel: sd 8:0:0:0: [sdc] Sense Key : No Sense [current]
kernel: sd 8:0:0:0: [sdc] Add. Sense: No additional sense information
kernel: sd 8:0:0:0: [sdc] Sense Key : No Sense [current]
kernel: sd 8:0:0:0: [sdc] Add. Sense: No additional sense information

I was expecting to see an "sdc1" partition, but no partitions were reported either with "fdisk -l /dev/sdc". I thought there was a problem with my set-up, but there isn't any.
It turns out that the /dev/sdc itself contains the filesystem on the Nokia 5310 internal SD flash card.

Therefore, a simple "mount -t vfat /dev/sdc /mnt/disk" will make the Nokia 5310's memory card contents available on /mnt/disk.

To make things easier, I created an entry in autofs' auto.misc config file. My /etc/auto.master file relates the directory /misc with the /etc/auto.misc file. This is the content of my /etc/auto.misc file:

# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
dvd -fstype=iso9660,ro,nosuid,nodev :/dev/dvd
pen -fstype=vfat,rw,user,umask=000 :/dev/sdc1
nokia -fstype=vfat,rw,user,umask=000 :/dev/sdc

Now all I need to do is plug the Nokia into the USB port, and then, from the command line and as a regular user (not root), you can simply:

1) cd /misc
2) cd nokia
3) ls -la

...and you get a list of the files and folders in the phone's memory card.

After copying files from the phone to the PC and viceversa, remember to issue the command "umount /misc/nokia" to make sure all files get actually transferred before you unplug the USB cable.