Saturday, December 01, 2007

The beauty & the beast - installation of Ubuntu

NOTE: This installation was done on the same day as I wrote my last post. But didn't get enough time till date to write this.

I was too eager to get to get Ubuntu running on the iBook. I had already downloaded and burnt Ubuntu Gutsy (7.10) PPC 'Alternate CD'.
Originally I had planned for freeing up about 15 GB of space by removing photos, songs and some documents. But since my brother was not sure what all things were backed up and I was not interested in spending hours to write backup CDs I decided to go ahead with 5 GB free space.

Put the CD in CD drive and restarted the iBook. 'C' key needs to be pressed while booting to boot from CD.
Started installation in default 'install' mode. The text installer has not changed much since Warty (4.10). Cool. :-)

The installer asks many questions, one of the most important being disk to be used for installation and partitions.
Since I was not sure about what kind of boot partition was needed to have a dual boot I decided to use guided partitioning.
The drive had only one partition of 30 GB so I had to first resize it.
The partition manager asked me the new size of partition. It also told me that it can not be less than 25 GB since the largest free block in this partition was 5GB.
Wonderful. So resize existing partition to 25 GB and then use the 5 GB with guided partitioning to create necessary partitions for Ubuntu.

Nope, not that easy. The partition manager complained that it could not resize HFS+ partition. Stuck. :-(
I don't have a live CD so I can not use it to resize the partition. The disk management program in Mac OS X will not let me resize partition. And alternate CD installer tells me it does not know how to resize HFS+ partition. The worst problem was that I did not have internet access to search the solution.

About 10 minutes of thinking and some trials on my PC and I realized that there was a wonderful tool called parted. Not sure if it can do the job but there is no harm in trying.
I went back to installer menu and executed shell, which is named 'ash'). ash is a POSIX complaint shell with minimal features. Hence it is included on boot floppies and installation disks. (Actually it is dash which is a port of ash to linux)
After executing the shell I started parted program. It showed me the existing partitions and I gave the appropriate commands to resize the HFS+ partition to 25GB.
Wow, it says it will take around 40 minutes to do the job.

Break started.

Listened to some songs. :-)

Washed some clothes soaked up since morning. :-P

Ate 1-2 dry-fruit laddoo. :-D

This is all going on at around 1 in night.

Break ended.

Resizing finished.
Guided partitioning using remaining 5 GB. 1 MB allocated to 'NewWorld' boot partition, 275 MB for swap. Remaining went into '/'.

The installer continues after partitioning. It took around 25 minutes for the installation to finish all the stages and reboot. The boot loader installed was yaboot, not grub as it is usually done on x86 machines. Default boot option was linux obviously which means Ubuntu in my case. :-)

Felt really good to see the familiar screen and colors of Ubuntu on that 12" screen. :-)

Initial goodness:
ATI Radeon Mobility 9250 is supported by Free 'ati' drivers. So compiz works out of box.
Even though the machine is only 1.2 GHz it feels like it runs pretty fast compared to my PC with 1.6 GHz AMD Athlon processor. But this might be due to more RAM or I may be wrong.

Initial badness:
The default installation does not contain :-( (Ubuntu bug 164491)
There is no sound. In fact there is no device created for ALSA to use. (Ubuntu bug 60381)

I realized that there must be some sound module missing (not loaded).
'slocate snd- |grep ppc' told me that there was a module called snd-powermac. So I just loaded module with modprobe command and it was working. I also added it to /etc/modules file to load it on startup.
Surprisingly the sound in Ubuntu is louder/clearer than what iTunes/iPhoto produce in Mac OS X. Not sure if this is problem in applications or Mac OS X.

Soon I installed, many gstreamer plugins, libdvdcss2, thoggen by downloading them at a friend's place.

Now waiting for my phone/net connection transferred so that I can actually start some development work on this beast.
Yes, I have been busy and lazy at the same time. :-D

Coming up next - some nice photos and screenshots when I get the internet at home. :-P

Thursday, November 22, 2007

The beauty & the beast - introduction

Recently my brother decided to sell his old iBook because it was not sufficient for his work. He was planning to get a new MacBook provided he could sell the old one. So I just said sell it to me. And now I have the ownership of his iBook even if I have not yet paid for it. :-P

It is a very sweet looking portable machine. With only 12" screen it is compact enough to carry in a medium sized backpack. :-)

Following is the configuration.
PowerPC G4 processor 1.2 GHz
1.25 GB RAM (256 MB default + 1 GB additional my brother chose while buying)
ATI Radeon Mobility 9250 graphics adapter
30 GB hard disk
1 slot-loading combo drive
12" screen
1 internal modem
1 wired NIC
1 wireless NIC
2 USB 2.0 ports
1 FireWire
1 mini-VGA video out

It has Mac OS X v10.3 "Panther" installed along with many useful applications. It has M$ Office 2004. It also 'had' M$ Internet Explorer for Mac which is said to be superior to the Windows versions.

The beauty part of the machine is the portability due to compact size, elegant look & feel. The beast in the machine is the Powerpc processor, the only other processor architecture that ever threatened dominance of x86 architecture on desktop market, AFAIK. It is also said to have surpassed x86 processors in performance in 1990s. These days Powerpc processors are used in many embedded systems including the gaming consoles like Nintendo Wii, Sony PS3 and M$ Xbox 360.

Now here are my initial thoughts about the machine.

The Good:

  • 1.25 GB of RAM :-D

  • As already pointed, small screen.

  • Considering that it is 3 years old machine, combo drive, FireWire, USB 2.0 all constitute the good part.

The Bad:

  • Mac OS X v10.3. I don't plan to put any money on buying latest version and most of the Free softwares are dropping 10.3 support these days. This would have been in the section below but for the possibility of installing Ubuntu on this machine.

  • The DVD drive is having the region code 4. The default DVD player simply ejects DVD with different region code if I choose not to change region code of the drive. :-( Fortunately VLC ignores/bypasses region restrictions, is free for download and available for Mac OS X :-D

  • The keyboard. I am very confused about when to use which key out of 'Apple' key, alt/options key, ctrl key.

  • The touchpad with only one button. Combine this with the confusion mentioned above and I get a machine which is very hard to operate, IMHO.

  • User interface. While most users will praise how good the UI on their Mac looks, the problem is because I have been using Ubuntu exclusively for long time. This will also apply to Windows. So all those who think that Linux is hard to use, consider that it is also true the other way round. It is just matter of what you are used to.

The Ugly:

  • Airport Extreme wireless card which uses Broadcom 4306 chipset. It means that I have to use firmware extracted from binary only drivers to make this card work in GNU/Linux.

Now as for the 'Will you ... ' questions ...
1. No. I am not going to try Mac OS X v10.5 "Leopard". There is no incentive to spend money for it when you can get Ubuntu for free. And I also try to avoid using pirated software as far as possible. :-D
2. Yes. I will install Ubuntu on it. I may even try Debian when make some space on hard disk or when I decide to eliminate Mac OS X completely.

That is all for now. Ubuntu installation report coming soon. Stay tuned. ;-)

Wednesday, October 31, 2007

Article featured on 'Debian Package of the Day'

I have written reviews of some movies, software, books on my blog. But I know the audience of my blog is not large enough.

Few months back I discovered 'Debian Package of the Day'. This blogs features articles submitted by users about various applications available on GNU/Linux systems. Although it says 'package of the day', the articles are published on Wednesday and Sunday of every week.
Answering to their call for submission I wrote a review of Thoggen, a DVD ripping application and sent them a mail. The mail was unanswered till today.

Today I received reply that said that article was accepted with minor changes and will be published mostly by Sunday. Surprisingly the article got published today itself. :-D You can read the article at
For any question related to the article you can ask me via comments or other means. I think I will write more such articles in near future. Who knows, I may work as technical writer some day. :-)

Now who can guess the movie from the third screenshot? :-P

Thursday, August 30, 2007

Crossing the border - an octroi story

For some reasons unknown to me Pune and Pimpri Chinchwad are two different towns and have different municipal corporations. So every time you try to smuggle (i.e. transport) some 'good looking things' across the border you are supposed to pay octroi. The 'good looking things' is a generic term for new furniture, electronic/electrical appliances etc.

Few days ago, with the help of a relative I bought some electrical appliances (ceiling fans) from CME (College of Military Engineering) canteen. Those were packed in a bag rested on back seat of my bike. I was coming towards Shivajinagar unaware of existence of any octroi booth on the border. At some signal near Khadki station, a man appeared out of nowhere and asked me to take my bike on the road side. I had no clue what was going on.

He: "What's in the bag?"
I: "Some luggage"
He: "What luggage?"
I: "Ceiling fans"
He: "Open the bag"

I still had no clue. I though it was a routine security check inspired by bulgy look of my bag. I opened the bag and let him have a glimpse.

He: "Did you pay the octroi?"

A loud bell rang. I don't have a clear understanding of the rules related to octroi. Even if I had I didn't know there was an octroi booth.
I reverted with totally unrelated answer.

I: "I bought them from CME" (with a look on face asking 'what did I do wrong')
He: "Do you have receipts"

I produced the receipt. He verified that what I was saying was true.
He: "You can go"
Without a word I closed the bag, put the receipt in my pocket.
He: "Do you work in CME?"
I: "No, my brother"

It is observed that civil administration personals try not to interfere in matters where defense personals are involved.
He didn't bother to ask me my name or my brother's name. I didn't stop to give him another chance. :-)

Friday, June 08, 2007

Internet Explorer s**ks ... Javascript saves the day

Internet Explorer s**ks very badly. There are many who would agree and many who would not. I don't care as user. I don't use it. But I have to care as a developer of web application. The web application on which I am working is officially supported on Internet Explorer 6+ and Firefox 1.5+. This was the decision taken by my client and I have to make sure that there are no problems in the workflows when using any of the browser.

The background:
The web application I am developing provides management interface for a server. Recently the interface was redesigned from usability and look and feel point of view, as per comments of a professional web designer.
While making sure if it was working properly I realised that most of the workflows were not behaving as expected in Internet Explorer. I tried hard to find the pattern in misbehaviour.

The problem:
After some investigation I found that IE was submitting values of all buttons on the page to server with other form data. Due to this the server side code was not able to identify what action to carry out and it carried out the first action that it received in parameters. This is ridiculous. Also this happens when you use <button> tag and not using <input type="button"> tag. As per the HTML4.x standard created by W3C, a <button> tag is synonymous to <input type="button">. The reason I was using <button> was that I needed to show some images on buttons. This was part of the usability point of view of the redesign.

The frustration:
I spent 2 hours to find the solution for a thing that shouldn't be broken in first place.

The solution:
While searching on Google I found out that this was known bug in IE 6.x and was supposedly fixed in IE 7. Many people used different techniques to solve the problem, most of which involved use of Javascript. Finally I used a script found on one of the forums, modified it a little bit and it is now working nicely. The script disables all the buttons except the one which was clicked just before that form data is submitted.

<!--[if IE]>
<script type="text/javascript">
window.onload = function() {
 var btns = document.getElementsByTagName('button');
 for(var i=0;i < btns.length;i++) {
   if (btns[i].type == 'submit'){
    btns[i].onclick = function() {
     var btns = document.getElementsByTagName('button');
     for (var i=0;i < btns.length;i++) {
      if (btns[i].value != this.value)
       btns[i].disabled = true;
     this.innerHTML = this.className;
     return true;

Sadly IE developers for some reason choose not to follow W3C standard even though M$ is a member of W3C committee.

In other news Mark Shuttleworth asserts/confirms that Canonical/Ubuntu will not make any deal with M$ for protection against 283 unspecified patents that Linux and other Free Softwares infringe (or was it 319, does it really matter?). Good thing, at least some one is standing against the monopolistic and FUD practices by M$.

Saturday, April 14, 2007

Marathi blog (couldn't resist)

ब्लॉगर वेबसाईटने अशातच हिंदी भाषेमधे ब्लॉगींग करण्याची सोय केली आहे. हिंदी म्हणजे मराठी सुद्धा कारण लिपी एकच आहे. असं नाही की मला त्याची खूप गरज होती पण ...
मी माझ्या घरच्या कंप्यूटर वर युबुन्टू वापरत असल्यामुळे मी XKB किंवा SCIM वापरू शकतो. पण आता सगळे मराठी/हिंदी मधे ब्लॉगींग करू शकतात. खास करून माझा मित्र केदार. :-)

माझ्या कडून खूप अपेक्षा ठेवू नका कारण मला मराठी मधे काही चांगलं लिहून खूप वर्ष झाले आहेत. मराठी बोलणं सोपं आहे पण लिहीणं कठीण. :-D