Not Registered Login | Register

Fine tuning Ubuntu

last updated: 03. January 2008

Data exchange with Windows


FAT32 is mostly used for this task, since it is thought of as the greatest common divisor between both systems - apart from that it should have been already buried, since it is inconvenient for anything but perhaps USB-Sticks.

It has no techniques to prevent fragmentation, no support for access rights and the file size is limited to 4GB.
These issues might be not relevant for an 128MB-Stick, but if you have a 100GB+ data partition under Linux they are becoming more important.

if one just rethinks the situation and doesn't try to teach Linux to use a Windows FS anymore, but rather the other way round, he will find a better filesystem: ext2.

Basically you don't have to do much - you only need the Ext2IFS driver for windows.

but there is a small disadvantage too; the driver does not offer any fstools.
Therefore you will need to have a bootable Linux to do a fsck if there should be any problems.

Desktop Search Engine


A Desktop Search Engine is a daemon which extract metadata information out of you files, like the id3 tags on mp3 files or exif tags on jpeg images.

Tracker provides such indexing capabilities just like google desktop or beagle. But in contrast to the latter two it is tiny and extremely fast.

So if you want to try it out, you will need Tracker itself and a modified Nautilus Build to get some basic desktop integration.
You can find tracker / tracker-search-tool in the repositories and the updated Nautilus build here.
after you have got both installed you need yet to setup tracker.
this is done by simply done by running trackerd. If you enter this command in a console, you will notice how tracker will immediately start to crawl your home directory - this first run usually takes a while.
You should also add trackerd to your session, so it can automatically index newly added files.

If you want to try out if it works, just open nautilus, press Ctrl+F and type in for instance the name of your digital camera. ;-)

But the full advantage of Tracker becomes only visible once you tag your files. To do this in a comfortable way, save this file in ~/.nautilus/python-extensions/ and you will get an tags tab in nautilus.
You might need to install python-dev in order to make this work.

If you want tracker to be integrated with the deskbar-applet, place this handler in your ~/.gnome2/deskbar-applet/handlers/ directory.

Evdev for mouse


The EvDev Driver developed by Redhat is superior to older protocols like ImPS/2 or ExplorerPS/2 on account of supported buttons; it supports up to 32 buttons, while the latter ones could handle only 12.
But that limit is already being passed by modern mice, which offer 2D-scroll wheels and side/ extra-buttons.

For instance it allows mapping the window-chooser and using the cruise control buttons - the old ExplorerPS/2 always triggered the "button-back" event on using the scroll up button.

The except out of the /etc/X11/xorg.conf shows how to use evdev(>= 1.1) with an Logitech MX510 mice

Section "InputDevice"
	Identifier  "Configured Mouse"
	Driver      "evdev"
	Option	    "CorePointer"
	Option	    "Name" "Logitech USB-PS/2 Optical Mouse"
EndSection


You can find out the appropriate "Name" string by running

$ cat /proc/bus/input/devices

If you have more than one device with the same Name string, you can additionally give the "Phys" Option to identify the Device by USB-Bus.

Swap: file instead of a partition


Using a swapfile instead of a swap-partition has the advantage of being more flexible; while changing the size of a swap-partition requires repartitioning an may involve shrinking partitions containing data, you can grow/ shrink and delete a Swapfile without even touching the partition-table.

And since any change of the RAM size might require also adjusting the swap-size a swapfile might be a good idea.

But there is also a drawback; the Linux suspend function does not support suspending to a swapfile - but there is a solution in the form of Suspend2, which you have however patch manually into the Kernel, but then you can even compress the saved RAM content.
A swapfile might be also not suitable for multiple Linux-installations on one Computer, since it cant be shared between them.

In order to create a swapfile you have first to create a file of desired size filled with zeros (in the example it is 512MiB), next you have to format it it the swap file-system and tell the system to use it.

# dd if=/dev/zero of=/swapfile bs=1M count=512
# mkswap /swapfile
# swapon /swapfile


to make the file being mounted automatically you have to add the following line to your /etc/fstab

/swapfile      	none            swap    sw              0       0

ALSA: "expand" stereo to surround speakers


Most of the time using a surround speakers set with Linux you will only hear the two front speakers, because stereo input is not "distributed" to all speakers.
Even if you have duplicate enabled through alsamixer and the rear speakers are working quite well, center and LFE will still remain mute.

To change that, the only thing you need to do is edit your .asoundrc:
gedit ~/.asoundrc
You have to define to which speakers the input channels should be routed.

For a 5.1 set add these lines:
pcm.!default {
    type plug
    slave.pcm "surround51"
    slave.channels 6
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
}
and if you use a 7.1 set, these:
pcm.!default {
    type plug
    slave.pcm "surround71"
    slave.channels 8
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
    ttable.0.6 1
    ttable.1.7 1
}
Now the rear (and side) speakers will act as clones of the front ones;
the center and subwoofer will play a mix of left and right.