Friday, January 11, 2008

NTFS Support

No not everyone likes windows, in particular their proprietry file system, but sometimes it's easiest. Why NTFS? Well FAT32 can't store files greater than 2GB in size (not always an issue but could prove problematic, EXT3 can be read on linux but not natively on MAC or Windows and I don't use a Mac so formatting it into a Mac OSX Extended partition is almost pointless. In my case I have an external hard drive that I want to be able to be read by the most number of computers possible. NTFS here appears to be the most suitable solution (although it will have consequences).

Installing ntfs-3g on Debian GNU/Linux Lenny:

# apt-get install ntfs-3g

The above command should install the programs ntfs-3g, libntfs-3g, fuse-utils, and libfuse2. If not just use apt-get to install the rest.

NOTE: Debian GNU/Linux Etch users will need to install the etch backports or follow the instructions on the tutorial here.

Mounting ntfs-3g properly:

The following command should work wonders:

sudo mount -t ntfs-3g /dev/sda1 /mnt/windows -o umask=0,nls=utf8

ASIDE: Do it on your Mac:

For NTFS support on your mac simply install MacFuse (link to website).

Tuesday, January 1, 2008

Logitech Headphones Don't Work (Not Default Card)

This is the solution to the problem where your computer thinks it has two sound cards and the default one is not your headphones. As a result your headphones never get the chance to play any music/whatever you want to hear.

Firstly check that the computer recognises your device by typing the following command:

$ cat /proc/asound/cards

You should receive an output like follows:

 0 [Intel          ]: HDA-Intel - HDA Intel
                     HDA Intel at 0xfebfc000 irq 16
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                     Logitech Logitech USB Headset at usb-0000:00:1d.0-2, full speed

The default device is usually number 0. Notice my headset is device number 1 (not default) and therefore never gets a chance to play. Also pay attention to the name of the device in the square brackets i.e. in this case Intel and Headset. Using the name of the device you want to be default create the following file: /etc/asound.conf

# nano /etc/asound.conf

Insert the following text into the document and replace the word Headset with the name of the device you want to be default.

pcm.!default {
type hw
card Headset
}
ctl.!default {
type hw
card Headset
}

Now your headphones should be active when they are plugged in and your computers main card (in my case) when they are not.