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.

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.

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.


What if I told you that you can make your Linux OS look and feel like an Apple Mac ?

Mac OS X Dock
The panel in KDE with the MacOSX look and feel

Now-a-days a lot of development has been taking place in Linux on the usability front and some of the projects such as XGL are worth the efforts put into it. But for the die-hard Mac enthusiast who would settle for nothing less than a desktop which looks like the original, it is possible with some effort to make a Linux desktop look like a Mac OSX one by clever use of icon sets, wallpapers and themes.

Earlier I had explained how to convert your GNOME desktop to look like Mac OS X. Now it is possible to create an exact imitation of Apple's OS X look using a project called Baghira. In fact Arnaud, a Baghira user has written a very good tutorial to convert your KDE desktop to look like an Apple Mac OS X desktop. The tutorial is pretty detailed in its explanation of the steps and is replete with screenshots.

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

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.

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.

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.

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.

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.

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.

 
 
 
 
Copyright © Sun solaris admin