Thursday, June 29, 2006

They wanted me to play Games on Linux during the Lecture...

I've never been officially asked to play games in front of a crowd as part of a lecture before.. until NOW, that is! But to add to the joy, how about going out of Colombo (sort of) and into a camp? LKing Camp was what it was called and this second time around, it was held at the Sarvodaya, Moratuwa.

How much more fun could it get? Especially considering the timing with my dual core upgrade and 1GB RAM. So you could imagine how excited I was at the opportunity, when I was invited right after my speech at FOSS-Ed for hackers.

Getting machines for the setup was the event was a bit of a hassle due to the hardware being pretty new and the machines donated by University of Moratuwa still running Fedora Core 4. Ultimately I was able to convince an upgrade to FC5, which fixed most of the 3D grahic issues. On my notebook, I had to do a quick install of Ununtu since I didn't have time to get 3D working on Gentoo (its working now).

As for the game, I ended up going with the quake 3 demo as it performed very well on the intel based grahic cards we had with the Opensource driver. Unfortunately there were some problems when I plugged my notebook to the projector and so had to use a desktop to play the game :(. This too was quite a challenge as I had to look at a not_so_bright projected screen, where the enemy could barely be seen.

After spending an hour or so explaining how to optimize the system for gaming on Linux, we didn't get much time to actually play the game. Luckily for me. we played the game long enough for me to tie the score with my LAN opponent.....phew~

dsc00155.jpg dsc00160.jpg dsc00165.jpg

For more pictures: see all photos from LKing

Tuesday, June 27, 2006


I was quite impressed the other day when a few of us from the Lanka Linux User Group (LKLUG) visited the National Institute of Business & Management (NIBM) as a result of an invitation we received a little over a month ago, to deliver few lectures. The event was held on the 24th of June.

I thought they did a fantastic job in organizing the event by inviting us well ahead of time and following it up with suggestions for topics to talk of and later fixing a proper time slot that was convenient.

Surprisingly this was the first of such an event and they had even made it a public event (which we were unaware of until later), and had yet managed to fill an entire auditorium of about 90% outsiders.

It was only a couple of years ago that LKLUG first walked into NIBM and planted the seeds of Free & Opensource software by conducting a 2 day workshop on GNU/Linux. Therefore I think it was quite rewarding for us to see how organized and determined they have become in executing this event.

Good job NIBM! Keep spreading the love and freedom....

Monday, June 26, 2006

Getting a Lanka Bell CDMA working on Linux

Thought of bloggin on the topic as I am constantly asked about the topic. Its not that difficult to get the Bell CDMA phone working most of the time. If you have the hotplug or hald running as soon as you plugin the phone to the USB port it should get detected and the proper driver loaded.

This is how you can check if the driver was loaded properly:

Type dmesg and check the end of the output you should see something that says the ti_usb_3410 driver was loaded successfully.

# dmesg
ti_usb_3410_5052 2-1:2.0: TI USB 3410 1 port adapter converter detected

You can also check that the driver was loaded by using lsmod. The dmesg output should also tell you the USB serial port that the driver has bind itself to. (Usually /dev/ttyUSB0)

# lsmod|grep ti_usb_3410

Also make sure that the proper ppp modules have been loaded, or else you will notice that the dialer will not be able to connect to the ISP.

# lsmod|grep ppp


To connect, I'd recommend using wvdial with stupid mode. I'm not sure if any other dialers support the stupid mode. Create the wvdial.conf script as follows.

# vi /etc/wvdial.conf

[Dialer Defaults]
Init = ATZ

[Dialer BellNet]
Modem = /dev/ttyUSB0
Phone = #777
Baud = 230400
Init1 = ATZ
Stupid Mode = 1
Dial Command = ATDT
Username = your_user_name
Password = your_password

Your ready to dial.

# wvdial BellNet

At this point, I find that sometimes the driver is unable to activate the phone's modem unless you pick up the handset and set it down. This isn't always the case but most of the time wvdial gives up because it doesn't get any respose from the modem.

If by any chance you are having trouble with the driver when you look at the dmesg output then usually upgrading the kernel to the latest should help. Otherwise you could try downloading the old driver for 2.6 and installing it manually (you need to have the kernel source)

Thats it!

Monday, June 19, 2006

Cloning my notebook...and then mutating it!

Who said that only rich doctors were allowed to clone? I've just cloned my 3 year old notebook on to my brand new Acer TravelMate 4200 notebook that I got from my office.

While the operation wasn't extremely easy, given that I had about 30GB to clone accross a 100MBps shared LAN, it was relatively easier than reinstalling all my 500 odd packages. Given my preference for Gentoo Linux, this would have resulted in a considerable amount of down time waiting for everything to compile. Instead I had a workable system that was identical to where I left off.

Cloning 101

Cloning a GNU/Linux box is relatively simple. I booted both machines off two Knoppix LiveCDs, and then proceeded to configure the network cards on each notebook, so that they can ping each other. Then I partitioned my new notebook's hard drive, wiping out windoze, but keeping the hidden recovery partition just in case (i needed to return it). If you thought that this required creating partition sizes identically to the old notebook, then think again. I was able to utilize my new 80GB hard drive as I pleased, evenleaving some unpartitoned space to play with in the future.
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

 Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         509     4088511   12  Compaq diagnostics
/dev/hda2   *         510         521       96390   83  Linux
/dev/hda3             522         770     2000092+  82  Linux swap / Solaris
/dev/hda4             771        7617    54998527+   5  Extended
/dev/hda5             771        2637    14996646   83  Linux
/dev/hda6            2638        7617    40001818+  83  Linux

So as you may have noticed that unlike the doctors, we are not cloning the body but instead the soul.

# mkdir /mnt/install

Ater creating the install mount point, next I formatted the different partitons and mounted them, but in the following order:

  • format /dev/hda5 and mount to /mnt/install
    • # mkreiserfs /dev/hda5; mount /dev/hda5 /mnt/install; mkdir /mnt/install/{boot,home}
  • format /dev/hda2 and mount to /mnt/install/boot (I prefer a seperate /boot partition)
    • mkfs.ext2 /dev/hda2; mount /dev/hda2 /mnt/install/boot
  • format /dev/hda6 and mount to /mnt/install/home
    • mkreiserfs /dev/hda6; mount /dev/hda6 /mnt/install/home
Next I mounted the different partitions from my old notebook in a similar manner (without the formatting steps..duuh!).

By using rsync tool that was already installed on knoppix, I could now begin the cloning process by issuing the following commands.

On the old notebook

# /etc/init.d/rsync start

On the new notebook

# rsync -av root@ip_of_old_notebook:/mnt/install/ /mnt/install/

..and after about a few hours later the system would have completely been cloned.

Unfortunately as my hard drive layout (body) wasn't compatible with the old one, I needed to reconfigure the /mnt/install/etc/fstab and /mnt/install/boot/grub/menu.lst files and change the partitions to the correct values.

Finally, I installed the boot loader, GRUB on the new machine and rebooted it.

# grub-install --root-directory=/mnt/install/boot /dev/hda

kernel panic!

Ok so it didn't exactly go smooth, but only because I used a custom kernel that was optimized for my old notebook. After recompiling a new kernel with drivers for the acer notebook, and rebooting, I was able to get it to work like a charm. If you're using a standard stock kernel, then you are unlikely to have these issues.

One other point to keep in mind is to have some sort of automatic hardware detection deamon running so that you don't have to manually specify drivers. For this, redhat systems use the Kudzu package or something similar while debian systems tend to use the Discover package. I ofcourse opted to manually configure my drivers the Gentoo way!

Introducing Mutations...

I've already done a bit of mutation by modifying a couple of files, but ultimately the whole point of running Gentoo is to optimize it for my hardware. This is going to take a bit of time, as it requires me to recompile the complete system with new compiler flags (aka USE flags). I've already started download all the package sources and hopefully within a day or two I can finish that. I am eager to see how long it will actually take to compile the system, (while I work on it ofcourse), since it has got 1GB of ram and an intel Duo Core Centrino processor (see full specs below).


For anyone purchasing a new notebook thats worth value for money, the Acer TravelMate 4200 is an excellent choice IMHO. And if you want to fully utilize its power then an OS such as Gentoo or any other GNU/Linux disto for that matter is *the* excellent choice!

Processor: Core Duo T2300 1.66 GHz
Motherboard chipset: Intel 945GM
Memory: 1GB DDR2 SDRAM (upgraded)
Hard drive: 80 GB ATA 5400rpms
Optical drive: DVD Super Multi writer
Connectivity: Ports 4 x USB 2.0; RJ45 (LAN); RJ11 (modem); VGA-out, Bluetooth,Built-in devices 1 x Type II PC Card slot
Network: Ethernet 10/100/1000, Wireless LAN 802.11a, 802.11b, 802.11g
Display: Graphics hardware Intel Graphics Media Accelerator 950, 224MB
Screen: 15.4 inch, TFT (widescreen) 1,280 x 800
Dimensions: 358 x 269 x 33.8 mm
Weight: w/battery 2.98 kg
Other: Disk Anti-shock protection, Quick charge (80% in 1hrs)

See Also

Friday, June 09, 2006

My new Cybershot!


After the last foss-Ed event and seeing the quality of the pictures taken from my (6 year old) Kodak 3600DX camera, I decided it was time to buy a new one.

When deciding what sort of camera to buy, it occurred to me that having a small, highly portable one would be most practical as I can always carry it around with out pre-planning to take pictures. There were countless number of times that I wished I'd brought my camera along and had to settle for a quick phone camera shot, instead.

So I decided to go with a Sony cybershot T series. After reading a couple of reviews and especially this one, I was sold on buying the T30. I got mine at Nastash, a/the gadget shop at Liberty Plaza.

A few days after I went on a trip to Amaya Hills (aka Le Kandian), and took these pictures among others :)


dsc00054.jpg dsc00069.jpg dsc00046.jpg dsc00061.jpg

More Pictures from Amaya Hills

Wednesday, June 07, 2006

Ubuntu [Drapper] Launched in style!


Many geeks turned up at ExcelWorld on last Sunday for the launch of the much waited and anticipated version of Ubuntu, codenamed Drapper. Drapper, aka Ubuntu 6.06, has several improvements over previous versions. Here are some of the high-lights:

  • Single installable LiveCD

  • Graphical Installer

  • Nice sleek look (Ubuntu only IMHO)

  • Official promotion of Kubuntu

  • Update notification applet

  • Improved hardware support, especially for wireless devices

Anyway, I hope to write a review on my first impressions on Ubuntu later this week.. so stay tuned.

I got to the party a little bit late - at around 6pm even though it was on from about 1pm. As I arrived I could see a table infested with geeks, notebooks and digi camera's. Got myself a set of Ubuntu and Kubuntu CDs of which I installed Ubuntu on my home barebone system as an addition to the existing 3 or 4 other distros :)

Anyway it was a fun launch... enjoy the pictures.