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.

Tuesday, December 11, 2007

Debian: Lenny Default with Sid Repository

First add the sid repository to your '/etc/apt/sources.list'. See Below

# sid
deb http://http.us.debian.org/debian/ sid main contrib non-free
deb-src http://http.us.debian.org/debian/ sid main contrib non-free

Now create a new file called 'apt.conf' in '/etc/apt/'. Add the following to it's contents

APT::Default-Release "testing";

Now update your repository. If by any chance it appears that the cache limit of apt is not enough simply add the following line to the 'apt.conf' file you just created and update your repository.

APT::Cache-Limit "20000000";

To update your apt repository simply type the following command into a terminal:

# apt-get update

What's Good for Your Repository

Below is a sample repository with sources I have found useful. #'s will symbolise comments and I will provide the keys where possible:

# Avant Window Navigator
deb http://download.tuxfamily.org/deb4gilir/avant-window-navigator/ unstable main

# Compiz Fusion
deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./

# Multimedia (w32codecs, libdvdcss)
deb http://www.debian-multimedia.org testing main

# VirtualBox
deb http://www.virtualbox.org/debian etch non-free

Tuesday, November 27, 2007

Debian: Installing ATI Graphics Drivers and Compiz Fusion in Lenny (XGL)

Installing the ATI graphics drivers:

Use APT to install fglrx-amdcccle, fglrx-control, fglrx-driver and fglrx-kernel-src

# apt-get install fglrx-amdcccle fglrx-control fglrx-driver fglrx-kernel-src

Reconfigure xserver-xorg to use fglrx (NOT vesa) aswell as the correct resolution:

NOTE: If you only wanted a good resolution and Compiz Fusion is not important to you, you can stop here.

# dpkg-reconfigure xserver-xorg

Getting 3D rendering working:

Edit (or Add) any of the following lines in '/etc/X11/xorg.conf':

Section "Module"
        Load "i2c"
        Load "bitmap"
        Load "ddc"
        Load "dri"
        Load "extmod"
        Load "freetype"
        Load "glx"
        Load "int10"
        Load "vbe"
        Load "GLcore"
EndSection

Section "Extensions"
        Option "Composite" "0"
        Option "RENDER" "Enable"
EndSection

Section "DRI"
        Mode 0666
EndSection

To test if you have 3D Rendering working properly type in the following commands (you might need to install mesa-utils using APT first):

$ fglrxinfo

Correct Output (or similar, your graphics card should be identified):
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1700
OpenGL version string: 2.1.7276 Release

$ glxinfo | grep direct

Correct Output:
direct rendering: Yes

Installing XGL:

Unfortunately while ATI drivers support AIGLX, they don't work well yet with Compiz Fusion, so ATI users are still stuck with the XGL option (it at least works).

While there are XGL repositories out there for Debian GNU/Linux, Ubuntu has done most of the hard work for us so why not use their package? It's quick and easy. Install the following packages using APT:

# apt-get install libglitz-glx1 libglitz1

Install using dpkg the following package: xserver-xgl_1.1.99.1~git20080115-0ubuntu1_i386.deb

# dpkg -i ~/Desktop/xserver-xgl_1.1.99.1~git20070727-0ubuntu3_i386.deb

NOTE: Change the location of the file above to wherever you saved it (I saved mine temporarily on the Desktop).

Now edit the file '/etc/gdm/gdm.conf' and append the following line under [servers]:

0=Xgl

Next, append the following to the end of '/etc/gdm/gdm.conf':

[server-Xgl]
name=Xgl
command=/usr/X11R6/bin/Xgl -fullscreen -ac -accel glx:pbuffer -accel xv:fbo -fp /usr/share/fonts/X11/misc/
flexible=true

Installing Compiz Fusion for GNOME:

Edit '/etc/apt/sources.list' and add the following source to the end of the list:

deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./

Save the file then apply the following commands:

# apt-get update
# apt-get install apt-get install compiz-fusion-gnome

Optional: Installing Avant Window Navigator (AWN):

Append the following line to '/etc/apt/sources.list':

deb http://download.tuxfamily.org/deb4gilir/avant-window-navigator/ unstable main

Update APT:

# apt-get update

And finally install Avant Window Navigator:

# apt-get install avant-window-navigator awn-core-applets

Optional: Starting Compiz Fusion/Avant Window Navigator at the start of a Session:

Go to System->Sessions, then select Add.

The command to start Compiz Fusion is: compiz --replace
The command to start Avant Window Navigator is: avant-window-navigator

Debian: Installing ipw3945 Wireless Driver

Install ipw3945-source, ipw3945d, and firmware-ipw3945 using APT:

# apt-get install ipw3945-source ipw3945d firmware-ipw3945

You will need to make sure that you have module-assistant installed. If not just use APT:

# apt-get install module-assistant

Next use m-a to compile ipw3945-source:

# m-a a-i ipw3945-source

Edit '/etc/network/interfaces' using a text editor and append the following lines of text to the end:

# The wireless network interface
allow-hotplug eth2
iface eth2 inet dhcp

Debian: Installing LaTeX, Compiling LaTeX PDF's and LaTeX plugin's for Pidgin and gedit

Installing LaTeX:

Install texlive-common using APT:

# apt-get install texlive-common

or if you would rather install the full texlive package (which is usually not necessary) install texlive-full.

Compiling LaTeX PDF's:

Using pdflatex you can compile your LaTeX code into an easily readable PDF. i.e:

$ pdflatex <outputfile>.pdf

Pidgin and LaTeX Plugin (pidginTeX):

Install imagemagick and download the pidginTeX olugin source code from Google Code (or here).

Extract the newly downloaded tar.gz (or tar.bz2) file and cd yourself into the related folder. Finally do a make and make install to install the plugin. i.e:

$ cd pidginTeX-<version number>/
$ make
# make install

NOTE: You must have installed LaTeX and either mimeTeX or mathTeX to use the plugin successfully.

gedit LaTeX plugin:

Download the latest Gedit LaTeX Plugin from sourceforge.net (or here).

Extract the contents of the file to '~/.gnome2/gedit/plugins'. You may have to make the plugins directory.