Monday, 31 July 2006

Book Review: Unix to Linux Porting - A Comprehensive Reference

In this age of numerous flavours of Unix and Linux OSes, it is imperative that applications are developed to work on a vast majority of them. But historically, Unix had been fractured, with each flavour of Unix - be it IBM AIX, Sun Solaris or HP-UX implementing its own libraries and system calls. And it would have been a nightmare to port an application running on one Unix flavor to another. But things started to brighten up a little when most of these Unices as well as Linux decided to embrace the standards set forth by the standards bodies such as ISO and POSIX.

May that be, it is still a bit difficult to port Unix applications to Linux and vice versa because the applications that are to be ported might be using non-standard APIs. And the team porting applications from one Unix flavour to Linux or vice versa should be aware of the system calls and other features of both Unix and Linux. For instance, the system calls made by each of these OSes - IBM AIX, Solaris, HP-UX or Linux - even though have a lot of similarities do have their own differences. And some system calls in one OS may not have an equivalent one in the other.

The book titled Unix to Linux Porting - A comprehensive reference, co-authored by Alfredo Mednoza, Chakarat Skawratananond and Artis Walker and published by Prentice Hall is a book which aims to be a capacious guide for developers who are into porting Unix applications to Linux.

Ironically, there are only 7 chapters but these chapters and the succeeding appendices make up over 700 pages which make this book rather voluminous.

The task of porting applications from one OS to another can be split up into 4 broad phases which are Scoping, Analysis, the actual Porting and finally the Testing and debugging phase. This book covers each of the 4 steps in a detailed manner dedicating separate chapters for each of them.

In fact the porting phase is further split up into 3 chapters for each of the three Unices - Solaris, IBM AIX and HP-UX. And in each case the respective authors have started from the rudimentary steps like setting up the porting system, explaining the differences in language specification, the compiler flags as well as the various tools like the linker, debugger and make in the respective OSes.

This book contains tables of all/most of the system calls in the respective Unix operating system and their equivalents in GNU/Linux and a short explanation of what the particular system call does.

The final chapter titled "Testing and Debugging" explains the use of tools such as GNU debugger, the use of strace and ltrace to pin point problems in the programs ported to Linux, memory optimizing tools such as electric fence, mpatrol and valgrind among others in detail.

But I found that the appendices - and these are as big and as many as the chapters themselves - have a lot of additional information which includes Solaris, IBM AIX and HP-UX to Linux reference tables, the porting issues faced when porting Unix applications to Linux to be run in Mainframes and so on. I really liked the appendix titled "Solaris to Linux Migration : A Guide for System Administrators" which lists the commands used in Solaris and their equivalents in Linux.

This book is definitely one of a kind and is an invaluable reference for anybody who is interested in porting Unix applications - and there are a whole lot of them - to work naively in Linux. But even those who are not into porting would benefit from this book as it provides insights into the system calls made by the OSes and the similarities and differences in their implementation.

Considering the complexity of the subject, it is not surprising that it took three people who are experts in their respective fields to come together to write this book. Alfredo Mendosa is an IT specialist in the Solution Enablement Group within the IBM Systems and Technology Division and is an expert on thread management and software algorithms. Chakarat Skawratananond holds a PhD and is a technical consultant in the IBM eServer Solutions Enablement Organization providing technical assistance to software vendors porting applications to IBM POWER systems running AIX and Linux. And Artis Walker is a consultant in the IBM Solutions Development Group and has published numerous tutorials and articles on migration and performance tuning for AIX and DB2. He is also the main author of several articles highlighting open-source solutions for AIX and Linux on the IBM POWER platform.

Chapters at a glance
  1. Porting Project Considerations
  2. Scoping
  3. Analysis
  4. Porting Solaris Applications
  5. Porting AIX Applications
  6. Porting HP-UX Applications
  7. Testing and Debugging
  8. Appendix A : Solaris to Linux Reference Tables
  9. Appendix B : AIX to Linux Reference Tables
  10. Appendix C : HP-UX to Linux Reference Tables
  11. Appendix D : Linux on POWER
  12. Appendix E : gprof helper
  13. Appendix F : Porting issues specific to IBM zSeries Mainframes
  14. Appendix G : Solaris to Linux Migration: A Guide for System Administrators
Book Specifications
Name : Unix to Linux Porting - A Comprehensive Reference
ISBN No : 0-13-187109-9
Authors : Alfredo Mendoza, Chakarat Skawratananond, Atris Walker
Publisher : Prentice Hall
No of Pages : 700
Price : Check at Amazon.com
Rating : Very good

Saturday, 29 July 2006

The case of some Flash based games unable to display text when viewed in GNU/Linux

One persistent problem I used to face while using GNU/Linux was when I visited sites containing certain flash based games. The games played well but they never displayed the text embedded in it. I thought that it was a drawback of the flash player ver 7 provided for Linux. It never occurred to me to dig into the problem and find why it was happening so.

But recently, in the process of installing a software package, I installed all the core Microsoft fonts on my machine running Linux. In Ubuntu/Debian, there is a package called msttcorefonts which bundles all the most common true type Windows fonts. You can also copy the fonts from your Windows partition to Linux if you are dual booting between the two OSes. Once the fonts were installed, I was pleasantly surprised to see the above mentioned problem disappear.

That was when it struck me that perhaps the flash game in question could be using a Windows specific font to render the text in the game. And since there are no Windows fonts on a default Linux installation, the flash game/site is unable to show the text.

Fig: The game viewed on a system devoid of Windows fonts


Fig: ...and after the Windows fonts were installed.

So the next time you visit a flash site and can't see any text, be sure that it is because you don't have Windows fonts on your machine running Linux.

Wednesday, 26 July 2006

Beginner's Guide to Motherboard Selection

There was a time when installing Linux on one's machine was a chore and involved opening up the case and collecting information about the various hardware components attached to the motherboard such as finding what chipset was used in a particular PCI card.

I remember having to open the case and check the chipset used in my internal dial-up winmodem to get it to work in Linux. And I am happy that it was hard because most of my knowledge in hardware was gained in the process of trying to get many of the devices to work in Linux. And I concede I failed a number of times but each time I tried to install Linux and get it to work on my machine, I learned a bit more about my system.

Now a days, installing Linux has become child's play. Almost all the devices are detected out of the box and if at all you need to open up the case, it will be for upgrading or to troubleshoot any hardware problems. But it always helps to have some understanding about the various parts which constitute a motherboard as well as be aware of certain inherent drawbacks that certain mother board designs have. This comes in use at the time of purchasing a computer and will help in buying one with the most suitable and efficient motherboard design.

Fig: Motherboard features (Courtesy: Toms Hardware)

Thomas Soderstrom at Toms Hardware has written an excellent article which explains the process of motherboard selection. He starts with the motherboard component overview and goes on to explain the layout considerations, choosing the right foam factor, the different socket types used by different processors as well as the bios features. This article is replete with images of the motherboard and the socket types. It is no doubt an indepth article and a must read for anybody interested in knowing more about ones computer.

Tuesday, 25 July 2006

Kubuntu 6.06 LTS - An excellent Linux distribution based on KDE

At the time of the official release of Ubuntu Dapper Drake, I happened to visit the site of Kubuntu - the alter identity of Ubuntu. And on an impulse, I ordered a CD of the latest Kubuntu 6.06 LTS which was also released more or less at the same time as Ubuntu Dapper Drake but with a lot less fan fare. I forgot all about it till a couple of days back, when I received the single CD I ordered enclosed in a beautifully designed blue CD case.

This is one aspect of Ubuntu/Kubuntu I really like. They send you the CDs free of cost and they ship it to any place in the world and I believe this has helped in a large way in catapulting Ubuntu as the most popular Linux distribution.

Fig: Kubuntu desktop featuring KDE 3.5.2

By the time I received the Kubuntu CD, I was very excited and raring to check out what Kubuntu had in store for the Linux users. I found that there is a great level of overlap between Kubuntu and Ubuntu in that the way it boots up is the same for both the distributions. And Kubuntu also uses the same installer bundled with the Ubuntu live CD which makes it possible to install Kubuntu in a mere six steps. More over, all the Kubuntu specific packages are in the same archives as that of Ubuntu.

The end result is that an Ubuntu user can install all the Kubuntu specific packages by running the following command:
$ sudo apt-get install kubuntu-desktop
... and vice versa.

Kubuntu 6.06 has KDE 3.5.2 which is the latest version of KDE and so comes with its own set of improvements. One of the most noteworthy is the system settings dialog. In the earlier versions of KDE, the system settings which includes configuring hardware, desktop and any other thing related to KDE had their own separate dialog which made it rather confusing to navigate. In the KDE that is bundled with Kubuntu, all the configuration settings can be accessed from a single location which is the system settings dialog - Windows users will find it similar to the Control Panel but much more intuitive.

Fig: System settings dialog is much more intutive

Another thing which I found exciting was the inclusion of search as you type feature in each of the windows - be it the file manager or the system settings. And one has to just type the query string and the files matching the query will be selected in real time.

And to install additional programs, Kubuntu comes bundled with Adept - the installation manager similar to Synaptic found in Ubuntu. Here too, there is a search box and one has to just start typing and the results will be filtered as you type. I found this software to contain additional features such as tree view and advanced search with more options which made it a better option than synaptic.

Fig: Adept package manager in Kubuntu

KIO Slaves
Of course, the one feature I really like in KDE and which is a prominent reason to use Kubuntu is the KIO slaves. What this translates for the end user is ease of use and lesser dependence on the shell. KIO slaves (KDE Input/Output Slaves) are programs that provide support for individual protocols. For example, I can view a man page, locate files on the system, ftp to a remote location, browse through any windows shares on my network, ssh to a remote machine and much more from within the file manager konquorer which by the way also acts as a web browser. Some of the useful KIO slaves which I found interesting are as follows:
  • man:/command - This will show the man page of the command in Konquorer in a nicely formatted manner.
  • locate:/query - Locate files which match the query and show it in Konquorer. Under the hood, the protocol uses the locate command.
  • ftp://ftp.anothermachine.com - Will ftp to the remote machine and display the files in the location. If the username and password are required, it will ask for it.
  • fonts:/system - See all the system fonts. But the users can also view the per user fonts by navigating to fonts:/user
  • settings:/ - This will show all the system configuration links such as hardware configuration, display settings, desktop settings and so on.
  • fish:/ - allows one to access another computer's files using the SEcure Shell protocol. The remote computer needs to be running SSH daemon.
    Eg: fish://username@hostname[:portnumber]
Fig: A subset of KIO Slaves put to use in Kubuntu

All the commands are to be entered in the address bar of Konquorer. But I found that some of them also work in file open dialogs or the run command box and so on in KDE. The above list is only a small subset of the entire KIO slaves supported in KDE. The last time I looked, KDE supports nearly 50 different KIO slaves which includes one for tar, gzip and bzip2 archives.

Kubuntu is no doubt a very polished distribution bundled with the latest version of KDE. Unfortunately, it has till now been overshadowed by its big brother Ubuntu to a large extent. But when KDE releases version 4.0 some time next year, I am sure it will gain more popularity than it now has and hence claim its rightful share in the lime light.

Monday, 24 July 2006

AMD acquires ATI - What is in it for Linux ?

All the news sites and news television channels are agog with the news of AMD acquiring ATI - one of the foremost graphics card manufacturing firms which rivals Nvidia. In the future, when one buys a PC with an AMD chipset, there is a good chance that it will have on-board graphics as powerful or even more than the graphics cards sold by ATI. This means that we need not have to buy a separate Graphics card to meet our gaming needs. It might be an all in one solution. This is no doubt good news for the computer users in general.

What is in it for GNU/Linux ?
At present, the situation on the Linux front is that to play any OpenGL games or run a program which uses OpenGL to render its user interface - such as Blender, it is very much needed to use the proprietary graphics drivers provided by either of the two graphics cards giants - Nvidia and ATI (Now a part of AMD). Yes Linux has an open source version of the drivers for the ATI/Nvidia graphics cards but they are found to be severely lacking and fail to tap the full power of the graphics card. And suppose you do install the proprietary driver, if you so much as install a newer version of the Linux kernel, then there is a good chance that the propritery driver may not be suited and so one will have to fall back to the open source version of the drivers. This has happened to me a couple of times in the past.

So the question in every Linux user's mind is will AMD open source the graphics card drivers ? We can only keep our fingers crossed in this matter and hope for the best. But all the sound bites emanating from various news sites point in the negative direction.

Now I wonder when Intel will acquire Nvidia.... this is what is needed to heat up the war over the domination of the PC chip market.

Saturday, 22 July 2006

A list of companies selling computers pre-installed with Linux

There was a time when it was practically impossible to buy a computer with GNU/Linux pre installed. If you wanted to run Linux, you had to install it yourselves. Almost all PC manufacturers were shipping PCs with Windows OS. And if the buyer did not want Windows, he still had to pay the full price of the machine which included the cost of Windows OS.

But with Linux getting more user friendly as well as its improved out of the box support for various hardware devices, more and more people are opting to run GNU/Linux and its market share is increasing at a steady albeit glacial rate.

In my country for instance, it is possible to buy an assembled computer with Linux installed - something which was not possible or very rare a couple of years back. But the most significant aspect is that Acer, the Taiwanese PC manufacturer is selling its range of laptops with Linux pre installed and a Linux laptop from Acer is significantly cheaper than its Windows Laptop of the same make.

Lxer has a very interesting post which lists all the companies which offer PCs with Linux pre installed which could be useful for anyone interested in buying a Linux laptop or desktop.

Tuesday, 18 July 2006

Realising the true value of Freedom

Anybody who keep an eye on the happenings around the world would know by now that the Indian Government, in its drive to curtail and restrict anti-national elements from playing havoc have passed orders to all ISPs in the country to ban 22 sites which post volatile material and spread hatred. This comes in the aftermath of the dreadful bomb attack on a couple of suburban trains in Mumbai - the financial capital of India, which led to 100s of innocent people dying and many more getting injured. My heart goes out to the kith and kin who lost their loved ones.

The ISPs in their national zeal have taken the easy way out (according to a report in today's edition of a leading newspaper) and block whole domains. And blogspot.com, the domain which hosts this site is also included. The end result is, no body inside India can access this or any of the blocked sites directly.

And the fact that I cannot view my own blog brought some discomfort to me initially. But I love my country and if blocking a blog domain will restrict the anti-national elements from using it to communicate with each other and stop the spread of terror, then I am all for it and I am willing to put up with the discomfort. After all, the existence of a blog or a site pales when compared to the threat posed to the lives of innocent people.

But this situation set me thinking. Generally, people are not aware of the value of their freedom and take it for granted. It is only when some adverse situation arises and the powers that be decide to restrict the rights enjoyed by us that we start missing them and then we realise how much that particular freedom meant for us.

For example, people in the US of A enjoy a wide degree of freedom. But how many of them really value their freedom ? I guess not many because they take it for granted. It is only when they are on the verge of losing some of their freedom that they become aware of the significant part it plays in their lives.

Similarly, people in China are born and brought up in a society where the government has placed various restrictions. The Chinese will find it normal to live in their country because they have not enjoyed the freedom in the first place and so, will not be aware of what they are missing.

It is only when you enjoy a right and then that right is suddenly taken away from you that you start to realise how much it contributes to your well being.

On a similar vein, many people who use free software including GNU/Linux take it for granted and do not even think twice about supporting the software they enjoy using. But suppose tomorrow, the rule of law passes a decree that using GPLed free software is against the law and prohibits the sharing of free software including GNU/Linux distributions. This is when people who use GNU/Linux and free software will find out how much they have gained from this movement and then, people will start to realise the true meaning of the word 'Free' in 'Free Software' and associate it with the word 'Freedom'. Until then, a major section of people using free software will be more concerned about the price factor.

Update (July 21st 2006): With the blanket ban on blogging domains making news world wide and casting a shadow on the government, an official directive was sent to all ISPs to lift the blanket ban on the blogging domains. But the ban on the 22 or so sites will remain. So now all in India can access blogspot.com domains. This is surely democracy at work. I doubt this would have been possible in a more restrictive society. On another note, I believe we can learn something from this whole affair. That is one should not take ones freedom for granted. Rather, each one of us have a duty towards the society we live in which earns us the right of freedom.

Saturday, 15 July 2006

Image manipulation using Image Magick

In an earlier post, I had reviewed Gimp - a robust image manipulation software which is installed by default in most Linux distributions. Gimp can no doubt be held at par with the industry leader Adobe Photoshop at least in creating images for the web. But sometimes a situation arises where it is not feasible to use a GUI based software to modify images; perhaps because the machine does not have a running X server or you need a tool which allows you to do batch conversions of 100s of images to the required size.

Fortunately, there is a very powerful suite in Imagemagick. I call it a suite because it is actually a collection of tools (11 to be exact), each of which accomplishes a particular task. These tools are as follows:
  • animate - This tool can be used to create animated Gifs.
  • compare - This is used to mathematically and visually show the difference between two images.
  • composite - Used to overlap one image over another.
  • conjure - This tool is used to execute scripts written with the special scripting language called Magick Scripting Language.
  • convert - This is a versatile tool in that apart from using to convert between a variety of image formats, it can also used to do many image manipulations like crop,blur, join two images and so on.
  • display - Shows an image on any X server.
  • identify - displays the properties of an image including its size, dimentions and type of image.
  • import - This is an interesting tool to capture screenshots of the desktop or even the console if one is working in the console. The output can be saved even in postscript format.
  • mogrify - The use of this tool is similar to the convert tool but with one difference in that mogrify will overwrite the current image where as convert will write the result into a different image.
  • montage - create a composite image such as providing a border to the image, placing text and so on.
  • stream - a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats.
I usually use Gimp for all my image editing needs and so am not so fluent in using Image Magick suite. Carson McDonald has put together a very interesting tutorial in using two of the tools (convert and montage) in the Image Magick suite to illustrate some of the special effects.

Wednesday, 12 July 2006

Get Free Linux DVDs - And I am not talking about Ubuntu

For once, some one has come up with a project to ship free DVDs of a choice of mainstream Linux distributions which includes Fedora, SUSE 10.1, Mandriva, Gentoo, Debian and Knoppix. People always talk about the stupendous success of Ubuntu. But what many fail to notice is that the very fact that Ubuntu gained so much popularity was because they chose to send free CDs of their Linux distribution to people residing anywhere in the world and the recieving party need not even pay the cost of shipping which made it really tempting to order the Ubuntu CD and try it out. Of course the Ubuntu team has been hard at work at fine tuning the distribution to work flawlessly with an ever growing number of hardware which also added to its popularity.

This project of shipping free DVDs of Linux distributions is the brain child of a Canadian supplier of Linux systems and compatible hardware who has a presence on the web at linuxstore.ca . You may order any one distribution free of cost at this page. Of course it remains to be seen if this is really a smart advertising campaign for a limited time period to bring more publicity to their site and ring in more sales for their other hardware products or they are genuinely committed to providing free DVDs of Linux distributions for as long as possible.

But seriously, all main stream Linux distribution companies should take a leaf from Ubuntu and start shipping free DVDs/CDs of their distributions. It should not pose a problem considering that a blank CD/DVD costs just pennies and what ever costs they might incur in shipping will be more than offset by the added publicity and goodwill generated in the process. And they can always carry on making money by offering extra services such as online support and add-on features.

Monday, 10 July 2006

Transform KDE desktop into Apple Mac OS X

Designer logo
One of the biggest motivation for a lay person in buying an Apple Mac - apart from its robust high-end hardware and its OS stability - is its beauty. Over the years, Apple has pioneered new ways of easing the desktop users life with its well designed desktop OS - Mac OS X. Many people who set their eyes on an Apple Mac for the first time will be tempted to buy it.
Read more »

Sunday, 9 July 2006

Book Review : PGP & GPG Email for the Practical Paranoid

How many people are in the habit of encrypting their email or even digitally signing it before sending it to a recipient ? It will be fairly correct if I state that a majority of us do not think twice about these things. But if you are a person who, in the process of conducting business is forced to rely on communicating and sharing sensitive details via email, then you should be concerned about the security and validity of the mail you send and receive from your clients and business partners. In such a scenario, tools which allow one to encrypt/decrypt data and digitally sign ones email gains a lot of prominence. And the tools PGP and GPG are two such robust tools which make use of advanced cryptography to achieve this.

The book titled 'PGP & GPG Email for the Practical Paranoid' authored by Michael.W.Lucas and published by 'No Starch Press' is a book which in my opinion is aptly titled and which I found to explain these concepts in an informative and entertaining manner. This is a relatively small book containing 11 chapters and spanning just around 200 pages. Irrespective of its small size, I found that the whole book covered all that one needs to know about the encryption technology and how to put it to practical use via PGP and its free alter identity GPG.

But to use the two tools PGP and GPG effectively, it helps if one is aware of the basic concepts behind the working of these tools. And in the first chapter titled "Cryptography Kindergarten" the author explains in a simple manner all the terminology related to cryptography and encryption that one will encounter while using PGP or GPG. The second chapter titled "Understanding OpenPGP" is an extension of the first chapter where the author elaborates on concepts such as keypairs and keyservers which play a very important role in the effective use of these two tools.

The third and fourth chapter of this book deal with installing both PGP and GPG on ones machine. And surprisingly, the author does not limit the discussion to just one operating system rather, installing on both Windows and Unix like operating systems are given equal importance. And these two chapters form an important part of the book as other than installing the software, one gets to know for example, how to generate the public/private keys and more. Interestingly, in these chapters, the author also give a couple of hints on the various steps to take in running the programs in a secure manner.

It is comforting to know that every aspect of using GPG and PGP has been covered in lucid detail in this book. For example, in one of the chapters, the author goes into a detailed explanation of managing ones keys and how to decide whether to trust a person or not.

One of the biggest uses of PGP and GPG are in their integration with any of the email clients available. By integrating these programs via plugins, it is possible to encrypt, decrypt and digitally sign all or selective emails one send or receive with the click of a button. In the 9th and 10th chapter of this book, one gets to know how to use either of these programs in conjunction with an email client. These chapters explore the concepts of digital signatures, creating custom policies and how to send and receive PGP signed email.

For the command line enthusiasts, two very good appendices are also included in this book which explain how to achieve most of the tasks using command line switches of the programs.

The concept of encryption is a rather dense subject to understand especially for people with a less technological bend of mind. But encrypting email or digitally signing ones email become inevitable where the stakes get high such as while conducting business and it is here that programs such as PGP and GPG adopt a larger role. And this book contains all that need to be known about the concepts of encryption technology and how to make use of it with the aid of tools like PGP and GPG.

On a different note, I found the design of this book quite pleasing and a joy to read with many tips provided in an eye catching light green background. And in my experience, just because a book contain good content will not guarantee that the book will actually be read. It should also be packaged in a way which is pleasing to the eye. And this book from No Starch Press comes on top in both content as well as structure and design.

Chapters at a glance
  1. Introduction
  2. Cryptography Kindergarten
  3. Understanding OpenPGP
  4. Installing PGP
  5. Installing GNUPG
  6. The Web of Trust
  7. PGP Key Management
  8. Managing GNUPG Keys
  9. OpenPGP and Email
  10. PGP and Email
  11. GNUPG and Email
  12. Other OpenPGP Considerations
  13. Appendix A : Introduction to PGP command line
  14. Appendix B : GNUPG command line summary
About the Author
Michael W.Lucas is a network and security engineer with extensive experience working with high-availability systems, as well as intra-office and nationwide networks. He is the author of the critically acclaimed Absolute BSD, Absolute OpenBSD and Cisco Routers for the Desperate books.

Book Specifications
Name : PGP and GPG - Email for the Practical Paranoid
ISBN No: 1-59327-071-2
Author : Michael W.Lucas
Publisher: No Starch Press
No of Pages: 200
Price : Check Amazon.com
Rating : Very Good

Saturday, 8 July 2006

Migrating and moving Unix filesystems

A couple of times in the past, I have seen one or two of the partitions on my system running Linux filling up at a rapid pace and during those times I have wondered how best to create more space. And I ended up using third party tools such as partition resizing programs to make more space. It is because of this hassle that many prefer using Logical Volumes to store data instead of directly storing it in the partitions. Using logical volumes, it is quite easy to shrink or grow a volume by adding or removing partitions to/from the volume using the tools available in all Linux distributions without any data loss what so ever and without sheding any tears. In previous posts on this blog, I had explained how to create and resize logical volumes in Linux.

Having said that, it is possible to migrate data from the filled up partition to other partitions on the same disk or an entirely different disk all together but there is a method to the madness. Martin Brown explains how to go about moving data (entire directory structure) from one partition to another. The reasons for doing so could be as diverse as freeing up much needed space in the partition to circumventing an impending fault in the device containing the data. And the process can be done in a system running in single user mode or a live and running system where you need to ensure that the files are available during the move.

And he lists out 8 steps to accomplish the task at hand. They are as follows:
  1. Choose the data to be copied
  2. Create a new partition
  3. Create a new file system on the partition
  4. Mount the partition on a temporary directory
  5. Copy the data to the temporary directory
  6. Rename the original directory
  7. Create the new mount point. And finally ...
  8. Mount the file system.

Friday, 7 July 2006

10 things to know before buying a video card

I have an Nvidia GEForce2 MX/MX 400 graphics card with 64 MB RAM. For me this is more than enough and meets all my needs including playing a couple of OpenGL games. And I get decent frame rates with this card - provided I have installed the Nvidia's proprietary drivers for Linux. But to play the new games on the block especially the graphics intensive variety, you might need a more powerful card. And Nvidia and ATI are the two dominant players in the graphics card market.

Seriously how does one choose a graphics card from the ones available in the market? If you ask me, the best bet would be to strike the right balance between price and power. But there are a couple more things you have to consider before you make the jump.

James Yu lists 10 things one might consider before buying a video card. It is not something that one may not be aware of but nevertheless it makes an interesting read.

Thursday, 6 July 2006

OASIS Open Document Format for Office Applications

If you ask me, one of the widely used software at any time - if you discount the web browser and the text editor - would be a word processor. A word processor is an integral part of any office setup and plays a significant role in its day to day affairs. And there are a plethora of word processors around from the proprietary ones like Ms-Word and WordPerfect to open source ones like OpenOffice and Abiword.

But all these applications (baring the open source ones) encourage their users in saving the files in their own unique file formats. This is because the application whose file format is most widely used will rule the word processor market as the users are inadvertently tied down to using that application and will find it hard to switch to another. Going by this trend, Microsoft Word has come up as the most widely used word processor stifling its competition to such an extent that its one time competitor WordPerfect is nowhere on the scene.

So a need was felt in various quarters to develop and promote an open file format for saving office documents which any word processing application can read and write to flawlessly. And the end result of this is the formation of a group called OASIS which created an open file format called the Open Document Format (ODF) for office applications. This office format has gained a lot of publicity in recent times with the Massachusetts state in the USA decreeing that all the documents created and saved by state employees will have to be based on open formats. And they went on to specify two formats which meet their requirements which is the OASIS ODF and Adobe's PDF.

Open Document Format (ODF) is an open, XML-based file format specification for office applications and this format can be used to read and write office documents such as spread sheets, presentations, memos, letters and charts. The OpenOffice ver 2.0 supports this format by default. What is interesting is that with this file format specification gaining more and more takers, it will only be a matter of time before it becomes the de facto standard for saving documents created in office applications irrespective of which application is used to create the document.

It is worth noting that the ODF has already been approved as an international standard by ISO (International Standards Organization). And considering that Microsoft stands to lose a lot in the rising popularity of ODF, they have been trying to promote their own open file standard called OpenXML which they claim have much more features than its counterpart. And recently bowing to the pressures that be, they have decided to create a plug-in which allows users of MS Office suite to convert their files to and from ODT to OpenXML and vice versa.

This war over file formats can be compared to those fought in the past between VHS and Betamax video formats or the more recent BlueRay vs HD DVD. Either way, it is the users of the office suites who stand to gain in the adoption of open standards in file formats and in my opinion, ODF stands out over OpenXML in terms of popularity and its openness.

Tuesday, 4 July 2006

Review: Opera Ver 9.0 - A trailblazer in the web browsing arena

I have always been fascinated by the web browser called Opera that is developed by a Norwegian firm going by the same name. I remember using this browser even a couple of years back when IE was still the default web browser in a PC and its alternative Mozilla/Netscape had all the sleekness of a sloth. At that time, Opera was an ad-supported software. But sometime in September last year, Opera decided to remove the ads and make their web browser for the desktop completely free.

The current version of this web browser is ver 9.0 which they tout as the fastest web browser in the world. Opera has released their web browser for multiple platforms including Linux. What I find unique about Opera is its very small size even after bundling all the paraphernalia such as an email client, news and rss readers, IRC chat client and what not. Just for the sake of comparison, I opened Firefox (ver 1.5) web browser and opera (ver 9.0) each from cold start and I found that Opera consumes much less memory than Firefox even with all these extra features built in.

Fig: Opera web browser with all the toolbars visible

Once I started using the latest version of Opera, I discovered a number of useful features which made my browsing experience that much richer.

For one, Opera has an inbuilt Notes feature similar to the KJots program in KDE which allows one to jot down notes in a book format. There is even an option to email the notes to others without ever leaving Opera via its integrated email client. Suppose I come across a useful article which I would like to read later. In Opera, I need not save the whole web-page rather, I can just select the relevant section and right-click the mouse and select 'Copy to Note' option or press the '[Ctrl]+[Shift]+C' key combination and it will be automatically filed in the Note app. And the interesting fact is that the notes can be kept in conjunction with the websites that need to be referred later. I found another use for the notes in that I could store data in notes which can then be used for simple completion of web forms.

Another feature I found really useful was the ability to view any webpage using the stylesheet of ones choice. In fact, there are a total of 8 inbuilt styles that are bundled with opera with option to create ones own styles and apply to the website one is visiting. I find this feature in a web browser god send especially when I visit websites which are created with a poor eye to color and contrast. But that is not all, Opera makes it possible for one to view just the links and images in a website. This is achieved by navigating to View -> Styles and clicking "Show images and links only". Or if I want to see the structural elements like the CSS classes and ids used in a webpage, I could select the next entry below it. I believe some of these functions are possible in Firefox too with the aid of extensions. But it is nice to see these features built in by default in a web browser.

Opera Widgets
But the one feature which pleased me the most in ver 9.0 of Opera are the Widgets which are miniature applications that run alongside Opera and live on the Desktop. Opera has made available a great collection of widgets which have a variety of uses. Some of the more prominent ones which caught my fancy are as follows :
  • Clock widget - Displays an analog clock. And one can change the style of the clock by just clicking on it.
  • News widgets - Shows the most recent stories from news sites such as BBC, Slashdot, Digg and so on. Perhaps we can look forward to seeing similar widgets of other prominent news sites too in the future.
  • Calculator widget - Provides a cute functional calculator.
  • Wikipedia widget - Search the wikipedia encyclopedia site from this widget.
Fig: Circular tetris game widget

Fig: Wikipedia widget

After seeing the Opera widgets in action on my Linux desktop, I couldn't resist comparing them with the Dashboard widgets in OSX.

Opera is very strong on the usability front
One look at the sheer collection of keyboard shortcuts is enough to give an idea of what I am talking about. I was able to do all the tasks in Opera without taking my hands away from the keyboard even once. In fact, even web links could be navigated entirely via the keyboard. But opera has improved on this. For one you have the mouse gesture which allows you to easily navigate to and from a webpage with the wave of the mouse which I am sure will be appreciated by many though I still prefer doing things via the keyboard.

Fig: The dialog which pops up the first time mouse gestures are enabled

And suppose you want to see how the webpage you are visiting will render on a small screen such as in a cellphone for instance... By pressing 'Shift+F11' or navigating to View -> Small screen, Opera will render the current webpage in the small screen format. If the webpage is not optimized for the small screen, it will be rendered as such. One thing I really found irritating in earlier releases of Opera was the short-cut key to open a new page which was mapped to '[Ctrl]+n'. In ver 9.0, they have mapped it to the Firefox default of '[Ctrl]+t' . So there are some minor changes in the new version as far as shortcuts are concerned.

Fig: Google News site as seen in a cellphone display

Easily block selective content on a webpage
Many times, I have come across websites which contain very interesting articles but which I find embarrassing to read in front of others because the site also contain one or two unsavoury images. Opera makes it easy to block selective content from a website. Using opera, I can easily block these unsavoury images by right-clicking on the webpage and pressing 'Block content'.And then I could click on the images to be filtered out and those images will disappear from view.

A few useful Opera commands
Opera has a couple of useful commands (or addresses) which can be used to view/set the important settings of the web browser. These commands are to be typed in the Opera address bar. They are as follows:
  • opera:plugins - Lists all the plugins that are enabled in the browser like the flash plugin, java plugin and so on.
  • opera:about - Gives all the useful details of Opera installed on ones machine. Like the path settings, preferences, version number and so on.
  • opera:history - This lists all the pages visited for the past couple of days along with the time of visit.
  • opera:cache - Opera speeds up the general web experience by caching most frequently visited webpages. This means that a person browsing on a slow Internet connection need not wait so long for each subsequent visit to a webpage. This address lists all the files cached by Opera on ones system.
  • opera:config - Presents all the configuration details found in the Preferences dialog in an easy to use web interface. And the user can easily edit and change the settings in the relevant sections.
Search made simple in Opera
To search for a term using a particular search engine, it is possible to prepend a character before the search term in the address field. And Opera will execute a query to the particular search engine for the text one is searching. Some of the characters that could be used for this are as follows:

g - searches Google for the search term. Eg: type 'g Linux' without the quotes in the Opera address bar.
e - searches on EBay
r - searches in Google Groups
y - searches Yahoo!

Of course, it is possible to add a different search engine and use it instead of the default ones that are provided.

End Note
There is a lot more to this feature rich, standards compliant web browser and each day I find new ways of using Opera to heighten my browsing comforts. Definitely the developers of Firefox - another web browser that I am really fond of - can imbibe a couple of the path breaking features found in Opera.

Monday, 3 July 2006

Care to break the law using GNU/Linux ? Then here are a couple of ways of getting free internet access.

The dawn of the internet era has seen more and more people jump on to the internet bandwagon and spend a significant part of their free as well as work time online. Each day we find different ways in which we can make use of the Internet and slowly but surely, the world wide web is getting more and more ingrained in our daily lives. And as with any popular medium, we find energy being dissipated in various quarters in getting free access to it by taking advantage of the loopholes found in the technology being used.

Doug has an interesting article where he describes how to use ICMP tunneling to get access to your neighbours internet connection.

ICMP stands for Internet Control Message Protocol which is used to carry the information about the status of the network. It has a wide variety of uses such as reporting on the availability of remote hosts, the errors in the underlying network and detecting network congestion. 'ping' - one of the most common programs which is used to test the network connectivity of up to three layers of OSI model uses ICMP to do its task.

And on a different note, Karl Bitz explains how to crack WEP using a machine running Ubuntu. The usual assumptions in both cases being that you as well as the neighbour in question rely on wireless technology to connect to the internet.

On a personal note, I do not support illegal ways of gaining things. In fact one very strong motivating factor for me to embrace GNU/Linux was the freedom from being dependent on (often pirated) proprietary software. But from a theoretical point of view, both the articles are interesting because they throw a wee bit more light on the technologies underlying the wireless internet access.

Sunday, 2 July 2006

Recording videos of your desktop in GNU/Linux

I am sure you have heard the popular saying - "A picture is worth a thousand words". It is always nice to have a medium to show people how a particular task is done. And instead of explaining it through words if we can show it in a dynamic form such as a video or a screencast, it will be better received.

Linux has got a couple of tools which aid one in creating screencasts in a number of formats including flash (swf) and mpeg.

One such tool is 'pyvnc2swf' which can be used effectively with the aid of a vnc server to create screencasts in flash or mpeg video. The site wolphination gives a detailed description of how to set up 'pyvnc2swf' to grab screen shots of the desktop to create flash movies of the same. But one thing that has to be noted though is that since this involves the use of a vnc server, it is important to set a password to connect to the vnc server as other wise, anybody with network access to your computer will be able to easily view and control your desktop.

If you are using 'x11vnc', you can create a password file by running :
# x11vnc -storepassword "password" /path/to/passwordfile
and then start the vnc server as follows:
# x11vnc -rfbauth /path/to/passwordfile
Another tool (not necessarily GPLed but free nevertheless) which I have enjoyed using is Wink. This software has to be downloaded from their website and once downloaded and unpacked, just double-clicking on the wink executable script installer.sh will start the installation. And once installed, you can start creating screencast of the whole desktop, a part of the desktop or just an application. There are options for inserting balloons or call-outs giving details of the steps in-between frames. I really enjoyed using this application and surprisingly, the resulting flash file of the screencast was within the acceptable limits which makes it an ideal tool for creating presentations and visual tutorials for publishing on the web. Unfortunately, the Linux version of Wink (1.5) is a bit behind the Windows version (2.0).

A third option which could hold a lot of promise in the future is a software called Istanbul which could well be integrated in the next version of Gnome. This is a python script which when once started will reside in the Gnome taskbar and one can use it effectively to create a video of the going-ons on the desktop.

So we Linux users do have a number of options for creating screencasts though each one of these lack the desired polish and can't be compared in the same league as those found in say OSX for instance. But work on that end is progressing in the right direction as the above projects would prove and we can look forward to a more polished and better integrated experience in the near future.