Tuesday, June 26, 2007

control your computer by whistling

This may seem a bit primitive when you compare it with the voice processing alternatives already available. However, as a zen enthusiast, I feel simplicity of it is what appeals to me the most.

Nathan Harrington has written a nice article, at the IBM developerworks Linux section, on how you can go about making your Linux desktop respond to your whistles. A video demo is available:



I am already excited about this; shall try and post my version soon.

Sunday, June 17, 2007

Installing a Linux distro without the need of an external media


Let me start by introducing the booting process in general.

When a computer boots, and has finished checking the integrity of the attached devices, the BIOS looks for the first sector of the media, hoping to find some executable that will takeover from there. Usually this executable is a kernel, or sometimes a bootloader. This kernel or bootloader can be located in different types of media, like CD drive, a hard disk partition, network server or a USB flash memory device. As long as it's located in the first sector, we're fine.

The idea is to create a small partition in the hard disk itself and make it act like a boot/installer disk. Since Linux distros come with a plethora of partitioning and mounting tools, if you already have an existing usable Linux installation in the same hard disk, and have a few hundred megs of hard disk space to spare (Depending on the size of the installer), things become really easy.

Basic outline (assumes a working Linux installation, from where the following steps would be carried out):

  • Download the installer ISO of the distro you intend to install.
  • Mount the installer ISO on a temporary directory
  • Create a new partition that would be used as bootdisk/installer disk, preferably in ext2 format. Let's call it "installer partition"
  • Copy the contents of the ISO from the temporary directory to the installer partition.
  • Update your grub by adding a new entry that points to the installer partition.
  • Reboot and boot from the installer partition
Additional notes:
1. Mounting the installer ISO on a temporary directory
Login as root (or do sudo)
Create a temporary directory /mnt/installcd
mkdir /mnt/installcd
Mount the iso file
mount -t iso9660 -o ro,loop=/dev/loop0 installer.iso /mnt/installcd
Where installer.iso is the installer ISO (Duh :P )

Now, you mount the installer partition to another directory /mnt/installpart
mount -t ext2 /dev/hdax /mnt/installpart
where /dev/hdax is your installer partition.

Copy the contents of the CD to installer partition
cp -rp /mnt/installcd/* /mnt/installpart

Now your installer partition has all the media needed to boot/install your new operating system.

The finale:
Now, all you need to do is to make an entry in your GRUB pointing to the boot partition.

Will update this section soon.

Installing Linux on your computer without CD drive

I have an old Dell Inspiron 5100 that I use for trying out new distros (and doing some whacky things with them ;) ). Unfortunately, the CD drive of my old Dell Inspiron 5100 has been behaving erratically of lately. This kind of gave an impetus to my quest for finding methods to install distros without using an optical drive.

The thing is, almost all distros have "official" ISO releases. Very few of these distros, however, provide documentation about what a user is supposed to do if he/she doesn't have a CD drive. Moreover, a majority of alternate installation methods involve the use of floppy disks. Needless to say, floppy disks and drives have been driven to extinction. So this is an area that needs more work.

My future posts would deal with some strategies for installing linux distributions on your computer without the need of a CD drive or a PXE boot. (these posts would have tags "no-cd" and "install", so that you can easily locate them)

Saturday, June 9, 2007

Ubuntu and Thinkpad R60E trackpoint

When I made a fresh install of Ubuntu Feisty Fawn on my new Thinkpad R60E, the trackpoint worked out of the box, well almost.

I didn't have any interface to change the trackpoint sensitivity or speed. Trackpoint scrolling wasn't enabled by default. Moreover there wasn't any intuitive way to enable "trackpoint press to select" i.e. tapping the trackpoint would emulate a left click action.


Thanks to thinkwiki.org, most of my complaints were taken care of with the exception of one: enabling "trackpoing press to select". And that's the basic motivation for the post.

The good news is that you don't have to install any additional drivers. The drivers that Ubuntu provides takes care of everything.

For trackpoint scrolling you would need to make changes in your /etc/X11/xorg.conf file. Details are listed here.

For changing speed and sensitivity, and enabling "press to select" the steps are pretty much the same as listed here. However in my case the path to the trackpoint settings was :

/sys/devices/platform/i8042/serio1/input:mouse2/device/

instead of

/sys/devices/platform/i8042/serio1/serio2/

That's all there is to this post.

Oh btw, if it helps my Kernel version is 2.6.20

Making use of your old desktop - Scenario 2

Scenario 2: Using your old desktop as a music studio

There isn't much to it.

Basic steps:
1. Purchase a cheap MIDI keyboard (something like M-Audio O2)
2. Install Ubuntu Studio
3. Understand the power of Jack

Making use of your old desktop - Scenario 1

Scenario 1: Using your old desktop as a media, file and download manager.

Why media manager?

If you already have like 5 gigs or more of media (music/movies), it would be an overkill to have another copy on every new system you buy.

Even if you have an external hardrive, you would have to compromise with your newly purchased laptop's mobility since it would always need to be connected to the external hdd whenever you feel like watching a movie or listening to your favorite music.

Having your old desktop serving those media files over home lan network makes more sense.

Why download manager?

If you download a lot of torrents, you'd have to keep your laptop running till all your torrents finish downloading -- again compromising on your laptop's mobility (and probably its life).

Having your old desktop as a download manager makes more sense.

Prerequisites:
Before we go any further, let me mention a few things here
1. Since your old system would be literally running non-stop, you need an operating system that requires minimum maintenance, and is least vulnerable to spyware and viruses.
2. Your old system should also have an ability for remote management. You should be able to control literally everything on your old system remotely from your laptop

The above two points hint at installing Linux on your old system.

Also I assume that you have a home network i.e. a router. The setup would look something like this:

Basic steps:
1. Install Linux on your old desktop (preferably Ubuntu)
2. Install FreeNX remote desktop management utility.
3. Install Jinzora media webserver.

I'll elaborate on these steps later.