Friday, July 11, 2008

KVM Virtualization solution to be tightly integrated with Linux kernel 2.6.20

There is good news on the horizon... which is that Linus Torvalds has merged the KVM code - which is the Kernel Virtual Machine Module in the kernel source tree leading to Linux Kernel 2.6.20. This opens up a lot of avenues as far as Linux is concerned. Using KVM, it is possible to run multiple virtual machines running unmodified Linux or Windows images.

KVM is not the only technology that is around as far as Linux is concerned. But its advantage over other similar technologies is that it is a part of Linux and uses the regular Linux scheduler and memory management which in turn makes it much smaller and simpler to use. It uses slightly modified userland tools that comes bundled with QEMU to manage virtual machines. But the similarity ends there as QEMU inherently uses emulation where as KVM makes use of processor extensions for virtualization.

A normal Linux process has two modes of execution - which is the Kernel mode and the User mode. When you use KVM, Linux will have an additional mode which is the guest mode which in turn will have its own kernel and user modes (see figure below).

On the down side, for KVM to function properly, your computer should have Intel or AMD processors which supports integrated virtualization technology in the hardware level.

Free Open Document label templates from Worldlabel

The regular readers of this blog will remember me mentioning a competition being conducted by Worldlabel.com in conjunction with the OpenOffice.org documentation project for creating Open Source templates. Guess what..., On the eve of the New Year, they have released the winning template which is a Thesis template for OpenOffice.org Writer designed by Matthias Ansorg. This template won the first place for its overall detail, comprehensiveness, complexity and use of different elements and functions.

Worldlabel is synonymous with creating labels in a variety of shapes and sizes for ones use which includes those for CD/DVDs, video, mailing, diskettes and shipping. And Worldlabel lets you download a set of free templates for designing and drawing labels in OpenOffice.org format and that too in both A4 and A5 paper sizes. In fact, the templates are available in XML Open Document Format (ODF) apart from Word and PDF and are released in the public domain, licensed under GPL.

At this stage some of you might wonder why you need a template for creating a seemingly simple task as printing labels. In the past, I have spent a couple of hours doing mailings and I can vouch for the fact that at the least, in many cases, it has been a hit and miss affair with the printer printing the addresses outside the label borders. And at the end of all that time and effort spent, I was left holding a couple of label sheets which had the addresses printed in a skewed manner.

The problem is that spacing for your label documents has to be extraordinarily precise to make sure that the text is printed exactly where it needs to be and if there is any difference in the spacing, then the text will overflow the labels when printed.This is where templates come into the picture. Using ready made templates such as the ones from Worldlabel which are provided free of cost and released under a Free license, it is possible to get the printing right each and every time thus minimizing the wastage of paper and ones efforts.

Fig: Worldlabel.com site has lots of Free label templates for OpenOffice.org

Using Worldlabel templates in OpenOffice.org is easy. It involves first downloading the templates from their website and saving them in a folder in your machine. Worldlabel has made it possible to download individual templates in Open Document Format or all of them at a stretch as a compressed archive. In the latter case, you download it and unpack the archive in a directory of your choice. I decided to download all the templates at one stretch and so selected the archive. And I created a directory named "oOTemplates" in my Home directory ( /home/ravi ) and unpacked all the templates into it.

The next step is to import the templates residing in the "oOTemplates" directory into OpenOffice.org so that they can be used to create the labels of the desired dimensions.

Fig: Importing the templates into OpenOffice.org

There is a simple way of importing the templates into OpenOffice.org; which is to open OpenOffice.org and navigate to 'File -> Templates -> Organize' which will open the "Templates Management" dialog. This dialog contain two panes namely the template pane and documents pane. Right clicking on any folder in the template pane and selecting 'New' will create a new folder for which you can give any name of your choice (See figure below). Since I was importing Worldlabel templates, I named the folder worldlabel. Now right clicking on the just created worldlabel folder in the template organizer and selecting 'Import' opened the file open dialog and I was able to import the Worldlabel templates which I had saved previously in the 'oOTemplates' directory.

Fig: Import the templates via the template management dialog

From here on, to use a template, all I need to do is select 'File -> New -> Templates and Documents' which will open the template dialog and I can select the template of my choice and start working in it. You will find a detailed article on using and customizing OpenOffice templates at the following link.

With Linux and Open Source gaining momentum, more and more business houses are realizing the advantages of embracing open file formats for their documents. And Worldlabel through its efforts in releasing top quality label templates in the public domain and also by taking the initiative to promote a competition to create the best template for OpenOffice.org office suite is pulling all stops to see that there is enough public awareness about the advantages of using Open Source software in general and open file formats in particular.

New Year 2007 - The year of GNU/Linux

Today is the dawn of a new year, the year 2007. Every year, we wish, hope and dream that it will be the year when GNU/Linux will gain critical mass appeal - not that it has failed to significantly widen its base. One of the most endearing aspect of GNU/Linux for me over and above the ideological considerations is its simplicity.

A couple of years back, when I was yet to be introduced to Linux, I remember having faced many situations when my OS (Windows 98) had died on me for no apparent reason and I was left staring at the blue screen of death. The outcome being doing a clean re-install of Windows. From those experiences, I realized that the Windows was a complex beast especially when it came to troubleshooting problems. Compared to that, troubleshooting in GNU/Linux is akin to a piece of cake or a walk in the park.

The inherent strength of GNU/Linux lies in the fact that all the configuration pertaining to the OS is saved in liberally commented text files which reside in a specific location. And almost all actions executed by the OS is logged in the appropriate files which are also plain text files. For example, reading the file /var/log/messages will reveal a wealth of knowledge about the actions carried out by the OS and the errors if any during boot-up. So once the initial learning curve is overcome, it becomes a joy to work in GNU/Linux.


Some time in 2007, we can hope to see KDE 4.0 released. Already, when I compare KDE 3.5 with older versions, I have found significant increase in speed with which applications start up. KDE 4.0 is expected to be much more snappy as it is developed using Qt 4.0 library and will contain a lot of additional features. Of course, this year Microsoft is also officially releasing its new OS Vista. But many reviews indicate that there are lots of shortcomings in Microsoft's latest offering and the general opinion is that it is not worth its price tag.

I am not trying to disparage Microsoft but when you have a fabulous choice in GNU/Linux which comes with an unbeatable price tag (Free) and if you are able to do almost all your tasks in GNU/Linux baring say playing some of your favorite games, why would you consider buying another OS paying hundreds of dollars ? More over if you are an avid gaming enthusiast, you should rather be buying a Sony PlayStation or a Nintendo Wii or even an XBox and not an OS.

There was a time when I used to boot into Windows to carry out certain tasks. But for the past many months, I have realized that I am able to do all my tasks from within GNU/Linux itself and it has been some time now since I have booted into Windows.

But when we look back, Linux or rather GNU/Linux the OS has done quite well in 2006. With many popular distributions opting for a 6 Month release schedule, we get to try out at least two versions each of many distributions each year. More over, we get the latest software too. Other than that, in 2006 we also saw the open source release of Java code by Sun Microsystems - a great victory for Free software enthusiasts. The Linux BIOS project also got its share of publicity with many hardware manufacturers evincing interest in the project. So in many ways I look forward to an exciting year 2007 for GNU/Linux, Open Source and Free Software. And as always (lets hope) 2007 is going to be the Year of GNU/Linux.

On this positive note, I wish you all a very happy and prosperous New Year.

15 tips to choose a good text type

When you use good fonts in articles either in print or in screen, it always makes a positive impression on the reader. Good fonts motivate a person to read the article from start to finish. Many times I have come across books - especially scientific journals which have a very small type face - so small that you end up squinting your eyes to read the text. In those circumstances, even if the article in question holds my interest, I usually pass it by or at the most just skim through the headings. Now a days most books that are printed have a good type face and the publishers have realized the advantages of using scientifically designed fonts to enhance the reading experience.

But selecting a good text type is not just imperative for printing, it holds equal importance in publishing articles for the web. Till a few years back, the font rendering in Linux was below par and the result was that viewing web pages was atmost lackluster. But now a days, rendering fonts in Linux has been significantly improved with support for anti-aliasing and sub pixel hinting that it has turned into a very good experience.

In a previous post titled "Optimal use of fonts in GNU/Linux", I had mentioned about all the facets related to fonts and how one can optimally use fonts in Linux. Now Juan Pablo De Gregorio blogs about the characteristics of good fonts and what fonts are good in a particular situation which makes an interesting read.

Book Review: Core Python Programming - 2nd Edition

Python dynamic object oriented programming language created by Guido van Rossum is known to deliver both the power and general applicability of traditional compiled languages without the complexities accompanying them. Coupled with its ease of use, programs written in Python can be run on multiple Operating systems and system architectures which gives it the same portability of any interpreted language. My first brush with Python was when I tried out a beautiful game called PySol — which is more like a collection of over 200 card games and PySol is entirely coded using the Python language. Nowadays a variety of Python web frameworks have also cropped up which promise the same kind of rapid application development that is possible using other programming languages.

I found the book titled "Core Python Programming" authored by Wesley.J.Chun and published by Prentice Hall to be an ideal book to learn the wonderful Python language. This book is quite voluminous, with 23 chapters spanning 1050 pages. The book is divided into two parts the first part titled Core Python which contain 14 chapters which impart a sound understanding of the semantics of the language and the second part titled "Advanced Topics" which contain a collection of 9 chapters which give a good introduction to the specialized uses such as in database programming, network programming, using threads in python, GUI programming and so on.

In the first chapter of the book, the readers get to know the various features of Python and the steps needed to install Python on ones machine. When you install Python on your machine, it also provides its own shell where you can execute pieces of python code. The author has taken advantage of this functionality of Python in narrating the concepts throughout the book. Each concept and syntax is followed by bits of code which the readers can try out in the Python shell in its entity. I found this process much easier in learning this language as one need not go through the write -- compile -- execute cycle which is more prevalent in the traditional languages.

In depth coverage has been provided for important concepts such as lists, tuples and dictionaries as well as data-types and string sequences and they have been provided separate chapters of their own. The sixth chapter titled "Sequences: Strings, Lists and Tuples" is the second largest in the book and is quite detailed in its coverage of the topic.

Chapter 9 deals with file manipulations where the author introduces all the built in functions available in Python which allow one to open, read from and write to a file. Interestingly, the functions are also illustrated by aid of short easy to understand examples. A couple of modules related to file handling are also introduced in this chapter.

Errors and exceptions form the basis of the 10th chapter where different errors and exceptions supported in Python are explained. This chapter also explains how programmers can create custom exception classes which I found quite informative.

One of the biggest advantages of Python is that all its functionality is split up into modules. A module could be just a single python file which contain a collection of functions or classes which can be re-used in programs written in Python. And all one has to do is import the module into ones programs to start using those pieces of code. The chapter 12 titled Modules give a firm understanding of this concept and also introduces different ways in which you can import external pieces of code into the Python program.

Chapter 13 titled "Object Oriented Programming" is by far the largest chapter in this book and spans over 100 pages. In this chapter, the author endeavors to give a sound base to Object oriented concepts as well as how they relate to programming in Python. The author introduces a large number of Python classes, methods and descriptors in this chapter.

Regular expressions play a very important part in programming verily because manipulating text/data is a necessity. And it is possible to easily modify and mould data to ones choosing by way of regular expressions. Python has strong support for regular expressions. The second part titled "Advanced concepts" of the book starts with a chapter on regular expressions. In this chapter, one gets to know about the regular expression module and many functions associated with the module. The author also provides a couple of examples which give insights into the ways in which regular expressions can be used in Python to reformat data.

The next two chapters give an introduction to the world of sockets and how Python can be used to write client server programs.

Multithreaded programming forms the basis of the 18th chapter. Here the author introduces a couple of modules available in Python which make it quite easy to create threads in ones Python program.

I found the chapter titled "Web Programming" very interesting to read. Especially since Python is used in a large way to create dynamic websites. And the next chapter titled "Database programming" gives a sound introduction to the Python objects which allow one to easily connect to and retrieve data from the databases.

I found this book really informative, especially suited for upcoming Python programmers. At the end of each chapter, there is an exercise section which imparts a nice touch to this book as it allows you to test your knowledge. Even though the advanced topics (second part of the book) are not covered in depth, the author succeeds in providing enough knowledge about the relevant Python modules and functions followed by a couple of examples which whets ones appetite without overwhelming the reader. This is the second edition of the book and it has been significantly revamped to include new features introduced in Python 2.5.

Book Specifications
Name : Core Python Programming 2nd Edition
ISBN No: 0-13-226993-7
Author : Wesley J. Chun
Number of Pages : 1050
Publisher : Prentice Hall
Price : Check the latest price at Amazon.com
Rating : Excellent Book to start learning the Python language.

The author Wesley J. Chun has been a former employee at Yahoo and has played a major role in creating Yahoo Mail and Yahoo People Search using Python. He has over 20 years of experience in the IT field with over a decade of experience programming in Python.

Readers please note: I had originally contributed this review to Slashdot.org

A sneak preview of the expected features in KDE 4.0

Ever wonder what KDE 4.0 is going to look like when it is finally released some time this year ? As far as end users should be concerned, it is going to be much more beautiful, responsive and usable than KDE 3.5.

Some of the features that it will have are as follows:

KDE 4.0 is perceived to make extensive use of SVG (SVG stands for Scalable Vector Graphics) for images instead of non scalable pixmap that is used now. For example, in KDE 3.5.x, games artwork are in pixmap and are at best lackluster. But we can see some great artwork in games in KDE 4.0 which will be using SVG.

Fig: Kreversi game in KDE 3.x and 4.0 respectively

Fig: KMajhong game in KDE 3.x and 4.0

Fig: Ksysguard in KDE 3.x and 4.0

The start menu is going to be redesigned. The sneak preview released indicates that it will have inner tabs and the applications will be grouped dynamically taking into consideration the usage of the person. Update (09-Jan-2007): A number of people have written to point out that the menu for KDE 4.0 while it just might incorporate some of the features of the kickoff menu shown below, has not been finalized yet, rather work is going on and it is developed implementing the Qt 4.2 libraries. The new menu is known by the name Raptor (More details here).

Fig: Sneak preview of the start menu in KDE 4.0

KDE 4.0 will replace the present DCOP inter process communication (IPC) system with a more advanced version built from grounds up known as D-Bus. IPC is a system which lets different applications communicate with each other.

KDE 4.0 will feature an API layer called Solid which will interact with projects like the hardware abstraction layer to let hardware connect smoothly with KDE.

KDE 4.0 will feature better multimedia experience through a project called Phonon which will collaborate with Solid. So no more need to choose multimedia backends as the Phonon API will take care of it.

Plasma will provide the next generation desktop experience in KDE 4.0. It is planned to integrate three separate applications namely the Kicker (Panel), KDesktop and Super Karamba (Widgets) into a single application. And the surprise of all things is that it will be possible to run the beautiful Dashboard widgets of Mac OSX in KDE 4.0.

KDE 4.0 will sport a brand new icon set created by the Oxygen project.

The KDE developers are working to provide a better communication experience through the project named Decibel. Through this project, it will be possible to provide integrated chat and phone communication including with networks such as MSN, Jabber and Skype.

And lastly, the Akonadi project intends to design a extensible cross-desktop storage service for PIM data and media-data to communicate with KDE, Gnome, POP, and IMAP through the same storage protocol. And this will be available in KDE 4.0.

But the biggest change is going to be inside the hood so to speak. KDE 4.0 will be using Qt 4.2 library which brings with it its own extensive set of improvements. For instance, Qt 4 is designed to save lots of memory and will perform faster. Besides the speed improvement, Qt 4 has a lot of other features and some things are simplified. So programmers need less time to develop applications which run in KDE 4.0.

And since Qt 4 library has been released under GPL, one can look forward to KDE 4.0 being ported to Windows and Mac OSX. Earlier versions of Qt is available under GPL only on unix/X11 and is released under a commercial license for development in Windows and Mac OSX . So KDE 3.x and earlier which uses Qt 3.x found it difficult to be ported to these platforms.

How to get a Windows Tax Refund

Ever wonder how Microsoft got so rich ? Yes, I can visualize you pointing to their flagship OS Windows. But it is not as simple as it looks. A major portion of Microsoft's revenue through sale of its OS comes from deals struck with various hardware vendors. The revenue it gets through sale of boxed versions of Windows is only a tiny minuscule percentage when compared to the money it gets through OEM deals. So when you go out to buy a computer especially from an established PC manufacturer, in majority of cases, you have no choice but get it pre-loaded with Windows. And even if you do not want Windows and intend to run some other OS, you end up paying for a copy of Windows.

In India at least, the situation is some what different because the assembled computer market is thriving and many people choose an assembled computer over a branded computer. But what do you do if you do not want to pay for a copy of Windows OS while buying a branded PC when you are sure that you intend to run Linux on it ? You can do what Serge Wroclawski did. With a good dose of patience, perseverance and good luck, he was able to get back over $52.00 - the price of an OEM version of Windows - which he was charged while buying a Dell PC