Monday, October 18, 2010

How to install latest skype in ubuntu 10.10 Maverick Meerkat

Skype is a simple user friendly software available in different platforms like Linux, Windows and MacOS, which enable you to make free calls(Audio,video and conference ) over the Internet by using VoIP protocol.

How to install Skype in Ubuntu

Add repository to Sources.list

$ sudo gedit   /etc/apt/sources.list

Uncomment the folliwing

deb maverick partner
deb-src maverick partner
$ sudo apt-get update 
$ sudo apt-get install skype
 Source Shibu Varakala

Wednesday, September 1, 2010

Ubuntu Release Naming Scheme

The official name of an Ubuntu release is "Ubuntu X.YY" with X representing the year (minus 2000) and YY representing the month of eventual release within in that year. Ubuntu's first release, made in 2004 October (10th month) was Ubuntu 4.10. Since the actual release date is not known until it's ready and humans tend to prefer names rather than numbers, a set of code names are used by developers and testers during the build up to a release:

The first "hog"

Meaning "covered with hair", or "mature/old/wise"

was going to be "Bendy Badger"... :)

Polished, with 5 years of support!

Fire up the crackpipes! (?!)

Courage and restlessness

Go Ape!

Hardy Heron with 5 years of support! Most people wanted Happy/Hungry Hippo :(

Released October 2008

Released April 2009

Released October 2009


The development codename of a release takes the form "Adjective Animal". So for example: Warty Warthog (Ubuntu 4.10), Hoary Hedgehog (Ubuntu 5.04), Breezy Badger (Ubuntu 5.10), are the first three releases of Ubuntu. In general, people refer to the release using the adjective, like "warty" or "breezy".

Tuesday, August 31, 2010

list your hardware with lshw

lshw is a handy command to look at your hardware.
To utilize its full capability you should be in root account.
Here is some sample output I got.

$ lshw
description: Wireless interface
product: RT2561/RT61 802.11g PCI
vendor: RaLink
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlan0
version: 00
serial: 00:21:29:6a:33:fc
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt61pci ip= latency=64 multicast=yes wireless=IEEE 802.11bg
resources: irq:20 memory:fdbf8000-fdbfffff

lshw can take several arguments. Look at manpages for lshw for full details.

Monday, August 30, 2010

How to reset Gnome-panel

 If your gnome panel goes haywire after tinkering , here is an easy tip to reset it back to normal

  gconftool-2 --recursive-unset /apps/panel

Sunday, August 29, 2010

Boot up ubuntu 10.04 Lucid Lynx faster

With  ubuntu 10.04 you can enable profiling option  at boot time to speed up booting. The system will  remember your previous profile and quickly boot using it . You can enable profiling using the following. steps.

  1. At your boot screen press “e” (for edit).
  2. Use your arrow key and move down to the entry beginning with “kernel”.
  3. Press “e” again.
  4. Add “profile” (no quotes) at the end of this line.
  5. Hit Enter.
  6. Click “b” (for boot).
 . Your next boot should be considerably faster.

Saturday, August 28, 2010

Booting iso images with GRUB 2

With thousdands of linux distributions around , booting iso images with out burning it to a cd or dvd  saves a lot of money and effort.   Let us try to boot system rescue cd. I have  ubuntu  lucid lynx installed on my laptop. Let us see how to boot   system rescue cd  from the iso image.   Get the latest system  rescue cd from here.
I keep all my iso images under /boot/iso folder . You can choose a different folder. (but note the exact path)

Add  the following lines to   /etc/grub.d/40_custom file
menuentry "SystemRescue CD ISO" {
loopback loop (hd0,1)/boot/iso/systemrescuecd-x86-1.5.8.iso
linux (loop)/isolinux/rescue64 setkmap=us isoloop=/systemrescuecd-x86-1.5.8.iso
initrd (loop)/isolinux/initram.igz

 You may have to tweak ( hd0,1 ) depending on  the location of your  iso image.   The line  
  loopback loop (hd0,1)/boot/iso/systemrescuecd-x86-1.5.8.iso

 above  mounts the iso image to  "loop".   The remaining lines specify kernel and initram image within the iso image.  

Now run "sudo update-grub" after saving /etc/grub.d/40_custom to include the new entries into the Grub 2 menu

Saturday, May 29, 2010

sun java 6 on lucid lynx

To install sun-java6-jre on Ubuntu 10.04 LTS, type the commands below in Terminal:
sudo add-apt-repository "deb lucid partner" 
sudo apt-get update
sudo apt-get install sun-java6-jre

Thursday, May 27, 2010

Installing Skype on ubuntu 10.04

Since ubuntu  10.04 Skype is part of the Canonical partner repository . Hence you can to install Skype  easily.  

    To install Skype in Ubuntu 10.04 Lucid Lynx from the partner repository, go to System > Administration > Software Sources and on the "Other software" tab, enable (check the box next to it) the " lucid partner" repository.
Now open a terminal and type 
$ sudo aptitude update && sudo aptitude install skype
Enjoy skype 

Friday, May 7, 2010

How to protect a password file in linux

A simple way to encrypt a file with a password is to use gpg (GnuPG). Suppose we have a file mysamplefile.txt, to encrypt it type the following on console.

$ gpg -c mysamplefile.txt

You will be asked to enter a paraphrase twice
A new file named mysamplefile.txt.gpg will be created.

To decrypt the file type
$ gpg mysamplefile.txt

Again it will ask the paraphrase and decrypt the file.

Thursday, May 6, 2010

Window control buttons on Ubuntu 10.04

 The window control button layout on new ubuntu 10.04 is very confusing to me. I just wanted to shift them to the right as shown below.
The easiest way is to download and install ubuntu tweaks from here. When installed ubuntu tweaks shows up under Applications ->System tools -> Ubuntu Tweaks. Launch it  and select window  manager setting on the left panel.

   You can rearrange the control button and title bar by dragging them to appropriate positions as shown below.

Some great software you miss on Ubuntu 10.04

Here is a list of software you must install to make your life easier on Ubuntu 10.04

Play back DVDs on Ubuntu Lucid Lynx

 It is pretty simple

  $ sudo apt-get install ubuntu-restricted-extras
  $  sudo /usr/share/doc/libdvdread4/


Managing archives with UNP

Install unp and forget about all worries about archives.

$ sudo apt-get install unp

Extract any archive with
$ unp archive_file

where "archive_file" can be a rar, zip, tar.gz, deb,
tar.gz2, rpm or any other archive.

Tuesday, May 4, 2010

Virtual box truubles on Lucid

Last night I upgraded to lucid. Every thing seemed to work smoothly. Then I tried virtual box. It failed saying that the kernel modules are not loaded. I quikly fixed the problem with
~$ sudo /etc/init.d/vboxdrv  setup
Then virtual box started showing the following error message.

VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).
 The following  commands fixed it.
$ sudo modprobe -r kvm-intel
$ sudo modprobe -r kvm-amd

Tuesday, March 23, 2010

How to start web development with XAMPP

 If you are planning to learn web development using  LAMP environment , and find it difficult to set up various component required,  XAMPP  can come to your rescue.   In fact, XAMPP is a prebuilt package with following componets, Apache,MySQL, PHP and Perl.
 You can download the XAMPP package from Apache Friends website. The present release is available for a variety of operating systems.


   For installation on Ubuntu I downloaded the tar.gz archive from Apache Friends
 I decided to install xampp into /opt . Untar the downloaded file using the following command.
sudo tar -xzvf xampp-linux-1.7.3a.tar.gz -C /opt
Earlier,  the name of XAMPP project was LAMPP . Hence a folder named LAMPP will be created under /opt with all necessary files.

Start/Stop XAMPP
  You  can start XAMPP using the following command from a terminal

sudo /opt/lampp/lampp start
 Similarly you can stop xampp using

sudo /opt/lampp/lampp stop

Look for any error messages while running the commands.

Using XAMPP to write your web application
  Now open up a browser and browse The following screens will appear .

You can access phpmyadmin from the tools section and work with mysql.

Now you can create a folder named public_html in your home directory.

mkdir ~/public_html

Now you can link this folder to your apache document root as below.

sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

 You can write your HTML/php code using any editor and save it under public_html folder in your home directory. You can test your code by browsing to ( Replace yourusername with your actual user name).

Security issues
  It is not advisable to set up XAMPP to a machine directly connected to internet.   The XAMPP is designed as a beginners platform to learn LAMP. If you want to run a production system look else where for a secure installation of LAMP.

Sunday, March 14, 2010

How To Create A Tune with Linux Multimedia Studio

LMMS is a free cross-platform alternative to commercial programs like FL Studio®, which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.

  On ubuntu you can install

$ sudo apt-get install lmms

 It shows up as Application -> Sound and video-> Linux Multimedia Studio

 When you launch it , you get the following screen.

LMMS offers the  following features.

  • Song-Editor for composing songs
  • A Beat+Bassline-Editor for creating beats and basslines
  • An easy-to-use Piano-Roll for editing patterns and melodies
  • An FX mixer with 64 FX channels and arbitrary number of effects allow unlimited mixing possibilities
  • Many powerful instrument and effect-plugins out of the box
  • Full user-defined track-based automation and computer-controlled automation sources
  • Compatible with many standards such as SoundFont2, VST(i), LADSPA, GUS Patches, and MIDI
  • Import of MIDI and FLP (Fruityloops® Project) files
If you are looking for a good tutorial on LMMS see this video.


Friday, March 12, 2010

Play wormux on Ubuntu

 Wormix is a  clone of classic arcade game worm. It is under active development under a free licence. Recently, wormix project has released version 0.9.1 of this beautiful game. It is available for ubuntu on a PPA. You can try out wormix  installing it from PPA.

sudo add-apt-repository ppa:wormux/ppa sudo apt-add-ppa repository: wormux / ppa
 Then update the packages and install wormix.

       $sudo apt-get update & & sudo apt-get install wormux
  A demo of wormix can be seen on the following video.

Wednesday, March 10, 2010

Two front ends for Clamav

Clamav is the most popular free anti virus program for Linux environment.( Of course it scans for widows virus) However, clam is a command line utility and you need some skills for manipulating is properly. There are several graphical front ends for clam av which can make your life easy. The most popular among them are clamtk and Klamav.

Clakmtk uses Perl-tk  for GUI. It is available for several distributions. On ubuntu you can install it as

$ sudo apt-get install clamtk

On Karmic it showed up as virus scanner under Applications ->system tools.

On launching it , the following screen pops up

You can select for  single user settings or system wide settings and then click save. The main window of clamtk will pop . You can choose  either your home folder  , a file or a specific directory for scanning.

  When the scan is completed a list of detected  viruses will be shown. You can select individual  infections and right click on them to delete or quarantine.

  ( My usb stick had nearly 100 infections. I wanted to select them all for deletion  . How ever I could not find such  an option.)

  Klamav is a KDE  based front end to clamav. You can install it with
$ sudo apt-get install klamav
It showed up as Applications->System tools ->klamav. On launching it, I

Tuesday, March 9, 2010

Nautilus Image Converter

Nautilus image converter is a nautilus  extension to mass resize or rotate images. if installed  an additional menu entry will appear when you  right  click the mouse inside nautilus. It is a convenient utility which can save you lot of effort.
For installation on ubuntu. do the following.

1.) Open a Terminal

2) Type the command

    $ sudo apt-get install nautilus-image-converter

3) Logout from the current session and login again.

 You can rotate or resize the image as seen in the screen shots below.



Sunday, March 7, 2010

Monitoring System Usage with systat

  An overburdened CPU is another obvious place to look for performance problems
on your system. Similarly io can be a bottleneck in proper system performance. You can watch various parameters if you install sysstat package.
On Ubuntu you can install with

  $ sudo apt-get install sysstat
 The sysstat package contains the following system performance tools:
  * sar - collects and reports system activity information;
  * iostat - reports CPU utilization and I/O statistics for disks;
  * mpstat - reports global and per-processor statistics;
  * pidstat - reports statistics for Linux tasks (processes);
  * sadf - displays data collected by sar in various formats.
See the screen shot of iostat command run from a terminal.
 Iostat can display cpu  usage statistics. The following command prints cpu stats every 3 sec

$ iostat -c 3 

To Print time stamp with CPU report you can use

$ iostat -c -t

 You can use pidstat to display detailed information on processes. See the screen shot below.

Saturday, March 6, 2010

Monitoring Memory Usage in Linux Machines

For any one running a linux desktop/server , the amount of free memory available on the system  is one of the critical parameters that deterimine the system response. We will look at  some  commands which give you information about memory usage 

   The free command provides the quickest way to see how much memory is being used on  your system. It shows the total amount of RAM   and swap space, along
with the amount currently being used.

Here are some examples of the free command:
$ free
             total       used       free     shared    buffers     cached
Mem:       2051656    1333508     718148          0     157452     461856
-/+ buffers/cache:     714200    1337456
Swap:      4416664          0    4416664

  free -m List memory usage in megabytes

  $ free -m
             total       used       free     shared    buffers     cached
Mem:          2003       1302        701          0        153        451
-/+ buffers/cache:        697       1306
Swap:         4313          0       4313

 free -b List memory usage in blocks
 sunil@Jaunty:~$ free -b
             total       used       free     shared    buffers     cached
Mem:    2100895744 1366093824  734801920          0  161419264  473022464
-/+ buffers/cache:  731652096 1369243648
Swap:   4522663936          0 4522663936
  free -mt List memory usage with totals displayed (Swap + Mem)

sunil@Jaunty:~$ free -mt
             total       used       free     shared    buffers     cached
Mem:          2003       1302        700          0        154        451
-/+ buffers/cache:        697       1305
Swap:         4313          0       4313
Total:        6316       1302       5013

     To avoid wasting RAM and speed up applications, Linux uses as much otherwise unused RAM as possible for the disc cache. For that reason, the first line of output from free that often shows little free RAM can be misleading. Please  pay closer attention to the second line of output, which shows the amount of RAM actually available for applications. That amount is 1305 MB in the above  example which shows
-/+ buffers/cache:        697       1305


The top command provides a means of watching the currently running processes, along with their memory usage.

$ top
 top - 10:53:00 up 29 min,  2 users,  load average: 0.42, 0.46, 0.45
Tasks: 199 total,   3 running, 196 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.9%us,  2.6%sy,  0.0%ni, 91.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2051656k total,  1335604k used,   716052k free,   158124k buffers
Swap:  4416664k total,        0k used,  4416664k free,   462016k cached

To exit top, press q. Like the output for free, top shows total of memory usage for
RAM  and swap space. However, because top is screen oriented and
provides ongoing monitoring, you can watch memory usage change every three seconds (by default). 

   With top running, press Shift+m and the running processes will be
displayed in memory-use order (so you can watch which processes are consuming themost memory). See the screen shot above.
    The most useful column to analyze a process’ memory usage is RES, which shows the process’ actual physical RAM usage, also known as resident size.
The MEM column is based on this resident size. You can look at the man page of top for more information.


 This command gives you virtual memory statistics.

sunil@Jaunty:~$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 1  0      0 682412 158804 489856    0    0    69    11  203  679  6  2 88  3
You can  view  memory use over a given time period. The following out put gives you vmstat every 5 seconds.

sunil@Jaunty:~$ vmstat 5
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0 682856 159000 489892    0    0    67    11  204  680  6  2 89  3
 1  0      0 682832 159004 489888    0    0     1     1  792 1969  4  2 94  0
 0  0      0 682684 159012 489892    0    0     0     2  752 1249  4  2 94  0
 0  0      0 682792 159012 489892    0    0     0     0  836 1839  4  2 94  0

The out put is printed every 5 seconds. To exit vmstat, press Ctrl+c. T$ vmstat -S m Display output in 1000k megabytes. You can try loading several applications and watch how the vmstat output changes .
   The kernel itself, however, has its own memory cache to keep track of its resources, called the kernel slab. You can use the vmstat command to display kernel slab memory cache statistics (from /proc/slabinfo) as follows:
sunil@Jaunty:~$ vmstat  -m
Cache                       Num  Total   Size  Pages
RAWv6                        23     23    704     23
TCPv6                        96     96   1344     24
flow_cache                    0      0     80     51
kcopyd_job                    0      0    264     31
dm_uevent                     0      0   2464     13
kmalloc_dma-512              16     16    512     16
mqueue_inode_cache           28     28    576     28
fuse_request                 62     63    376     21
       --------  ---       --------
kmalloc-16                 3772   4096     16    256
kmalloc-8                  6093   6144      8    512
kmalloc-192                9739  10038    192     21
kmalloc-96                  971   1008     96     42
          --- ----- ----
The slab memory cache information shows each cache name, the number of objects active for that cache type, the total number of objects available for that cache type, the   size of the cache (in bytes), and the number of pages for each cache. 

  You can also use slabtop , similar to top to display the kernel slab info.

The slabtop output updates every three seconds. By default, slab caches are sorted by the number of objects (first column) in each cache. By pressing c you can sort by cache size instead.

Friday, March 5, 2010

Greyed USB drives on Virtual box Guests

   I use virtual box   on my Ubuntu  9.10 box to  run windows XP. ( I use it for some EDA tools like Proteus ). This morning Virtual Box prompted me  to upgrade to version. 3.1.4 and I upgraded it . When I tried to put my Usb Flash drive in the guest OS , the drive was shown grayed as in the screen shot below.


 I searched the net for a solution and finally did the following steps to fix it.
Click on System-> Administration->Users and Groups 

Click on the Key button near"click to manage "

Click on Manage  groups and select vbx users from the box

Click on properites and  tick  your username.


Now restart the computer. Next time when you start the machine your flash drives will be visisble..

How to install Mac fonts on Ubuntu

Some beautiful fonts from the mac world is available at .You can install them to your ubuntu and enjoy the new fonts.

Download the fonts in a terminal .

$ wget
( I am not sure the download is strictly legal)
Extract the font files:

$ tar zxvf macfonts.tar.gz

Move the extracted fonts directory to the system fonts directory

$ sudo mv macfonts /usr/share/fonts

Reload the font cache:

$ sudo fc-cache -f -v

Thursday, March 4, 2010

How to install Picasa in Ubuntu 9.10

Google picasa is one of the best photo album managers available for windows and linux. Also, google provides web based album services. On ubuntu you can install picasa ( latest version is 3.0 beta) as detailed below.
Select System-> Administration -> Software Sources
Click on third party software. Add the following apt line.

deb stable non-free main
Click on add source and then close . System will ask you to reload the source. Do it. Open a terminal and import the google apt-key as below .

$ sudo wget -q -O - | apt-key add -apt-get update  

Now you can install picasa from synaptic. Or from the command line as

$ sudo apt-get install picasa 

The latest picasa 3.0 offers the following features.
  • Improved integration with Picasa Web Albums
  • You can sync your Picasa 3 and Web Albums edits, change your online album settings from Picasa, and delete online albums from Picasa.
  • Better uploading with the upload Drop-box and bandwidth throttling.
  • New Retouch tool to remove unsightly blemishes and improve photo quality.
  • Improved Collage tool lets you have total artistic control over your collage content and layout.
  • Auto red-eye: same results, less work for you.
  • Easily add text or watermarks to your photos.
Linux specific changes / improvements
  • User data are now stored in ~/.google/picasa/.
  • Camera/media detection integrated with Gnome/KDE.
  • Mozilla/Firefox browser integration done via a plugin.
  • picasa:// urls work in Firefox 3.
  • Downloading albums from Picasa Web Albums launches faster.
  • Better Xinerama support.

Wednesday, March 3, 2010

Clearing junk with BleachBit

Bleach bit is a utility which can free disk space, removes hidden junk, and easily guards your privacy. It can erase cache, delete cookies, clear Internet history, remove unused localizations, shred logs, and delete temporary files.
It supports around 70 applications and can be installed on windows and linux. On ubuntu bleachbit is available on the repository. However, it is a nice idea to look at the bleachbit website for any new versions.
On ubuntu you can install it with

$ apt-get install bleachbit

On my system running ubuntu 9.04 , two menu entries were added under Applications->system tools- Bleachbit and Applications->system tools- Bleachbit (root). If you launch it for the first time you will get the following screen.

This allows you to select the desired language also.

You can select junk data from various programs on the left pane. You can even preview the data before deleting it.

Tuesday, March 2, 2010

tar.gz, tgz and tar.bz2

On linux distributions we commonly see files named tar, tgz, tar.gz and tar.bz2. This note tries to explain common operations on such files.

tar is used to create a Tape ARchive. ( tar is from the old unix era) The resulting file is known as a tarball. A tar ball concatenates files to a a sin get the files out of a tarball, you can extract a tarball using

tar -xvf something.tar

To create a tar archive , the following command can be used.

tar -c /home/mydir > mydir.tar

tgz and tar.gz

If the tarball has also been gzipped (compressed), the file will be named tar.gz or tgz .You can use the following command to extract it.

tar -xvfz something.tar.gz

If you want to create a tgz as below.
tar czvf myfolder.tar.gz myfolder/


A tar.bz2 uses bzip2 compression on a tarball. Generally the size will be less that a tar.gz file .If you have a .tar.bz2 file , issue this command: ( You need bzip2 installed)

tar -xvjf file-1.0.tar.bz2
If you want to create a tar.bz2 as below.
tar cjvf myfolder.tar.bz2 myfolder/

Monday, March 1, 2010

Five Free PDF viewers for Ubuntu.

Portable document format is one of the most popular file formats on the web. Of course Adobe is the market leader for PDF. However, there are lot of free alternatives around. Here are some free pdf viewers for ubuntu.

a) Evince
Home Page

Evince is a document viewer for multiple document formats. It currently supports pdf, postscript, djvu, tiff and dvi. The goal of evince is to replace the multiple document viewers that exist on the GNOME Desktop with a single simple application.
Evince is installed by default on the ubuntu desktop.

b) xpdf

Home Page
Xpdf is an open source viewer for Portable Document Format (PDF) files. Xpdf project also includes a PDF text extractor, PDF-to-PostScript converter, and various other utilities.

On ubuntu you can install xpdf as
$ sudo apt-get install xpdf

c) Okular

Home Page

This is from the kde stable . Okular is a universal document viewer based on KPDF for KDE 4.
On ubuntu you can install okular as
$ sudo apt-get install okular

d) epdf viewer

Home Page

epdf viewer is lightweight pdf viewer based on poppler libs. The aim of ePDFView is to make a simple PDF document viewer, in the lines of Evince but without using the GNOME libraries.

On ubuntu you can install epdfview as
$ sudo apt-get install epdfview

e) Gv

Home Page
gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter.

On ubuntu you can install gv as

$ sudo apt-get install gv

Sunday, February 28, 2010

Using find to locate files

The GNU find command is a wonderful utility that can locate files on your Ubuntu system. The find command is part of the GNU findutils and is installed on every Ubuntu system.

The following paragraphs explain the basics of find .

The man pages show the syntax for using find as:

find [-H] [-L] [-P] [path...] [expression]

The optional flags [-H] [-L]
[-P] are not used commonly. They are useful only if your search want to follow
symbolic links. By default find command will not follow symbolic links.

The option [ path] refers to the location where your search should start.

The option [expression] refers to the way in which find should work.

Locating Files by Name

This seems to be the most common use of find. Try the following command on a terminal.

 $ find $HOME -name 'myfile.mp3' 

Note that I have quoted the name of the file to be found out. This must be made a habit, other wise you may get strange results ,especially when the file names have embeded spaces.

Find can accept wild cards like ? and * . If you wished to search for all of the mp3 files in your home directory, some of which you think might be named 'MP3' rather than 'mp3', you can run:

find $HOME -iname '*.mp3' 

The option -iname imposes case insensitivity on the search.

Locating Files by Size

Often you will look for big files in your home folder to save up some space . This can be done with

find $HOME -iname '*.mp3' -size +100M 

Other possible options with size are K and G for kilobytes and Giga bytes.

The above search can be modified to look for files less than 100MB as below.

find $HOME -iname '*.mp3' -type f -size -100M 

Locating Files by Access Time

It is also possible to locate files based on their access time or the time that they were last used, or viewed by the system. For example to show all files that have not been accessed in the $HOME directory for 30 days or more:

find $HOME -atime +30

You can combine various options to get better results. For example you can search for all mp3 files in the $HOME directory that have an access time of greater than 30 days:

find $HOME -iname '*.mp3' -atime +30

How to remove empty spaces in filenames

One of my friends gave me a collection of mp3 files last week . The files were ripped and converted to mp3 on windows platform. Even though music was excellent, the files or rather file names were not very pleasing . They all had empty spaces in in the file names. Some of them looked like this.
"my mp3 collection file1.mp3"
As I am using Ubuntu , I decided to strip of the empty spaces and put under score instead. The command for this is

rename "s/ /_/g" "my mp3  collection file1.mp3"

This worked for files with single spaces. There were some files with multiple spaces like
"my mp3 collection file1.mp3" . The above command will put under score for each space. Try the following command.

rename 's/\ * /_/g' "my mp3 collection file1.mp3"

This will fix multiple spaces with a single under score. This hack can work on all unix variants.

Wednesday, February 24, 2010

IDE for ada development

Here are some of the integrated development environments for Ada programmers.

For linux
a) GNAT GPL and SPARK GPL Editions

b) Emacs

If you are an emacs pro , try emacs ada mode from here

For Windows

a) Eclipse
Hibachi - Eclipse Ada Development tool
b) Adagide
Adagide is a cool ada ide for windows. Get it from here

Monday, February 22, 2010

Compiling Ada with gcc

One of my students wanted to to compile Ada  on ubuntu for a project he is working with. He came to me for help. But Ada is like chinese to me. How ever I  managed to compile a simple hello world progam. as below on Ubuntu 9.04

Install GNAT (GNU New York University Ada Translator):

sudo apt-get install gnat

Here is the hello.adb

with Ada.Text_IO;

procedure Hello is
   Ada.Text_IO.Put_Line("Hello, world!");
end Hello;

And use this command to compile:

$ gnat make hello.adb

You will get hello.ali and a binary hello in your home directory.

Alternately you can split the steps 

1. Run gcc to compile to object file:

gcc -c hello.adb

2. Run gnatbind to produce binder output:

gnatbind hello.ali

3. Run gnatlink to link and produce executable output:

gnatlink hello

Sunday, February 21, 2010

How to install skype on Ubuntu 9.10

     Skype seems to be the most popular application which is missing from ubuntu 9.10. Earlier it was available on medibuntu repositories and there are several howtos which explains installation from medibuntu.  If you want to  install skype, the best method is to go to the skype site and download the deb files they provide. The files are for ubuntu 8.10. However it will work fine on 9.10
 Get the debs from here.
32 -bit
64 -bit

Once you have downloaded the deb file , double click on the file. The gdebi package installer will be started and it will ask for your password.  Follow the on screen prompts and finish the install.
You can  add skype to your start up as below.

Go to "System -> Preferences -> Startup Application", Click "Add" and enter the following details:

  • Name: Skype
  • Command: skype

Click on Save.  Next time you start your system Skype will auto-launch.
Enjoy using Skype in ubuntu

Saturday, February 20, 2010


Findwild is utility program to search for files. It works quite differently from other file search programs you have seen. It has a GUI interface and can recall past searches.

The following search criteria are available:

  • directory path to search, with multiple wildcards ( * ? ) placed anywhere
  • file name(s) to search for, with multiple wildcards anywhere
  • file name(s) to exclude, with multiple wildcards anywhere
  • file content string(s) to search for, with multiple wildcards anywhere
  • file content string(s) to exclude, with multiple wildcards anywhere
  • file creation/modification date within a desired range
  • your choice of delimiters for search strings (defaults provided)
  • search the list of files produced by the previous search

Programmers may find this program useful to search a large source library for references to a symbolic name (e.g. find linux header file for a particular function or symbol).

Tarball with source code, make file, user guide: downloads
DEB and RPM package: packages


How to convert 3gp movies to avi

Most of the mobile phones with video cameras produce movies in 3gp format. If you want to convert them to avi format you can follow the following steps.

a) Copy the movie from your mobile to your PC . Let the name of the movie be mymovie.3gp

b) - Install mencoder. It is part of the mplayer package and available in the mutiverse repository on ubuntu
$ sudo apt-get install mencoder

c) Covert the to avi with following command.

$ mencoder mymovie.3gp -ovc lavc -lavcopts vcodec=msmpeg4v2 -oac mp3lame -lameopts vbr=3 -o mymovie.avi''

Friday, February 19, 2010

How to limit ssh login to specific users

By default, SSH will permit every user with an account on the machine on which it runs. You can control access to the server as below.
Open /etc/ssh/sshd_config in your favourite editor (as root). Add the following lines below the authentication section.
AllowUsers user1 user2
This will allow only users user1 and user2 access to login via SSH.
Save the file /etc/ssh/sshd_config and restart ssh.
#/etc/init.d/ssh restart

Ony users user1 and user2 will be able to login via SSH.

Thursday, February 18, 2010

How To disable root access via SSH

If you are planning to deploy openssh on any server, you must secure it from hackers. There are several programs on internet which can launch a brute force attack against your ssh server. The first step to a secure ssh server is to disable root access via ssh. Brute force attackers often try to guess root password using dictionary attack.

Open /etc/ssh/sshd_config file using your favorite editor. You must be root to do this.

Scroll down the file until you locate
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
Modify PermitRootLogin to
PermitRootLogin no
You can save the file and restart ssh server . On ubuntu you can do this as below.

# /etc/init.d/ssh restart

After restarting SSH, try to connect using the root account. Access will be denied. However , if you want to access root from a remote machine via ssh, login using a normal user account and use su to become root.

Open office 3.2 on karmic koala

Ubuntu 9.10 Karmic koala comes with Open office 3.1 . The current stable version of OO is 3.2 . You can very easily upgrade your system to OO3.2

a) Grab the installation file from . A deb file is available as OOo_3.2.0_LinuxIntel_install_en-US_deb.tar.gz . Download it .

b) Unzip and untar it to make a proper deb

$ tar -xzvf OOo_3.2.0_LinuxIntel_install_en-US_deb.tar.gz

This will create a folder named OOO320_m12_native_packed-1_en-US.9483.
You will see several other folders inside it. The deb files for OO3.2 is in OOO320_m12_native_packed-1_en-US.9483/Deb folder

Remove the current OO installation

$ sudo apt-get remove openoffice*.*

d) Install OO 3.2 debs
$ cd OOO320_m12_native_packed-1_en-US.9483/Deb
$ sudo dpkg -i *.deb

e) Finally install OO 3.2 menus
$ cd /desktop-integration/
$ sudo dpkg -i openoffice.org3.2-debian-menus_3.2-9472_all.deb

Wednesday, February 17, 2010

How to Protect Linux Users from Repetitive Strain Injury

If you are a hard core computer geek , you may be affected by Repetitive Strain Injury (RSI) . RSI is an injury of the musculoskeletal and nervous systems that may be caused by repetitive tasks, forceful exertions, vibrations, mechanical compression (pressing against hard surfaces), or sustained or awkward positions.

You can beat RSI if you install Workrave on your linux machine. This program will frequently alert you to take micro-pauses, rest breaks and restricts you to your daily limit. It tracks all of your keyboard and mouse activity. You can configure it to preplan your activity. A must for linux geeks.

Workrave is available as a package in the ubuntu repository.

$sudo apt-get install workrave will take away all your RSI troubles :D

Curtsey for the info.

Adding repositories with add-apt-repository

add-apt-repository is a helper script available on Ubuntu 9.10 for adding apt repositories .
For example
$ sudo add-apt-repository ppa:gnome-desktop
will add the gnome repository from the launch pad.

How to setup Chrome as your default browser on Ubuntu

Today, one of my students asked me how to change the default browser to Google chrome on Ubuntu.. This can be done as shown below.

Click on System-Preferences->Preferred Applications.

The screenshot above is self explanatory. Also note that you can change how your browser will start up from the above screen. It may also be noted that options exist for changing several default applications to your preferred ones via different tabs on the above screen. I also changed my media player from Rythmbox to VLC.

Tuesday, February 16, 2010

Manage TTF fonts with fonty python

Fontypython is a small utility that can manage, view and find your fonts on Gnu/Linux. It can handle TTF, OTF, TTC and Type1 fonts. Fontypython is available on Ubuntu repository. On karmic you can install it with,
$ sudo apt-get install fontypython

Once installed , you can run fontypython from a terminal


Now get some fonts from Internet. I downloaded , ml_tt_karthika a font for Malayalam into my downloads folder and clicked on the that folder . All the available fonts will be displayed with a privies on the
Now the screen looks like this.

Click on new pog

A window will pop up asking you to give a name.

Now select the new pog you created and then click on the font you want to add to the pog. ( A pog is a collection of fonts.) A red tick mark will appear on the font as below.

Then click on put into ( Karthika) button on the bottom and then click on install pog.
Your font will be now installed and applications can start using the new font.

Tuesday, January 12, 2010

Removing orphaned packages with GTKOrphan

The gtk orphan package present in the repositories of ubuntu can be conveniently used to clean up your system. It allows you to graphically select and remove packages that are no longer used.

On Ubuntu 9.10.Install gtkorphan as below.

$sudo apt-get install gtkorphan

A new menu entry will show up as System-Administration->Remove Orphaned packages.

Click on it.I got the following screen


Select the orphaned package you want to remove and click ok.

Finally, you will get the following screen.

Sunday, January 10, 2010

Openshot video editor on Ubuntu 9.10

Open shot is a non linear video editor for linux built around python , GTK and MLT frame work. Open shot 1.0 was recently released. This tutorial explains how to install it on Ubuntu 9.10.

On your Ubuntu computer, open System > Administration > Software Sources. .

Click the Other Software tab and then Click the Add button.

Type in the following line and Click on add source button.

deb karmic main

When prompted, reload the software sources information. You may see a warning about unverified software sources; we're going to fix that next.

Open your terminal and enter the following commands.

$ sudo apt-key adv --keyserver --recv-keys EDFBD1F9

The above command will import the apt key .
Next update the software sources

$ sudo apt-get update
Finally install open shot

$ sudo apt-get install openshot

Openshot will show up at Applications->Sound and Video->Openshot.

You can try editing a video.

Friday, January 8, 2010

Google Chrome and SRWare Iron

The chrome browser from google is a fantastic product. It is fast , reliable and multi platform. However, privacy advocates are concerned about some data that chrome sends to google while we are browsing. SRware, a German company has recently released a recompiled version of chrome named Iron to address the privacy concerns. The important differences between iron and chrome are listed here.
You can try out Iron on Ubuntu. Click here for down loading the tar.gz file.
Unzip the file like this.

$ tar -xzvf iron-linux.tar.gz

The file will be unzipped to a folder name iron-linux . You can click on the iron binary inside this folder to launch iron. Or you can add the folder to the PATH environment variable and launch iron from the command line.

Wednesday, January 6, 2010

Setting up an ad-hoc wireless network between 2 Ubuntu machines

You can create an ad-hoc wireless network between 2 linux hosts as shown below. Let us assume that we have two machine A and B both running ubuntu. We will assign to A and to B. I am also assuming that the drivers for the wireless card ( wlan0 here) are loaded already.
Run the following commands:
On machine A.

 ifconfig wlan0 down

iwconfig wlan0 channel 4

iwconfig wlan0 mode ad-hoc

iwconfig wlan0 essid 'fermilevel'

iwconfig wlan0 key 1234567890

ifconfig wlan0
On machine B

 ifconfig wlan0 down

iwconfig wlan0 channel 4

iwconfig wlan0 mode ad-hoc

iwconfig wlan0 essid 'fermilevel'

iwconfig wlan0 key 1234567890

ifconfig wlan0
Please note that essid and key must be same on both machines. You can change the given values.

Monday, January 4, 2010

Command Aliases in Terminal

All most all unix/linux shells support a feature called aliasing. Using this feature you can shorten a complicated command with several options to a handy one.

For example open a terminal and type in the following.

$ alias l='ls -l'
 Now typing l at the $ prompt will execute the  command ls -l .

Similarly you can alias any command.

If you want the alias to persist across reboots, add them to .bashrc

Copying Remote Files with scp

If you have ssh server running on a machine ,you can transfer files to/from it to any other machine connected over a network to it. The open-ssh server suite provides a utility named scp. Here are some examples of useful scp usage

Copy myfile to server
( ubg is my username on server1. You can replace server1 with an IP address or domain name. If the user names on the local machine and the remote server are the same you can omit it. See examples below.)

$ scp myfile ubg@server1:/tmp/
Password: ******

Copy remote myfile to local working dir
$ scp server1:/tmp/myfile /home/ubg/myfile
Password: ******

Use the -p option to preserve permissions and timestamps on the copied files:
$ scp -p myfile server1:/tmp/

If the SSH service is configured to listen on a port other than the default port 22, use
-P to indicate that port on the scp command line:
$ scp -P 12345 myfile server1:/tmp/

To do recursive copies, from a particular point in the remote file system, use the
-r option:

$ scp -r mydir ubg@server1:/tmp/

The above command will copy all mydir to remote /tmp

Sunday, January 3, 2010

Quick package install wth apt

On ubuntu , you can install a package quickly using apt as shown below.
Let us install mutt , the email client. The package name of mutt in the ubuntu repository is "mutt". ( You have to find out the package name somehow)

Press ALT+F2

The following pop will come.

Type apt:mutt in the window as shown.

Click on run.

The following pop up will come. You can press install and the rest of the procedure is same as package install from synaptic.