Skip to main content


Showing posts from 2008

A debate on influence of Islam culture on terrorism

The following is a debate I had with one of my friend during January 2009 on influence of Islam culture on terrorism. People decide who is right. It is posted in a popular social networking site, hence the beginning is in a regional language but my replies are always in English. The lines in brackets are my thoughts and not posted as a reply.


I believe religion has no bearing on cruelty, hatred has. If you want to stop this then you have to stop being unfair to the weak.
What do you think happens to the young guy in Gujarat, who saw his sisters and neighbors getting violated before his very eyes and the men who did that ran scot free because the government was a pussy and encouraged such practices.
Even in this case that idiot tried to gain some points by announcing cash to the deceased guy whose blood he was after in immediate past when the poor deceased constables families had to be content with a paltry sum.
Given a chance he would redo the riot and violate Muslims. And what the po…

Amarok/firefox/flash sound problem

It is a nagging problem in Linux which plagued me for quite some time. For example, if the Firefox window went to any page that contains needed sound(read flash) output, then immediately all external sound applications including amarok used to hand and also caused severe GDM freezes. It is fixed by doing the following:

I reinstalled pulseaudio and libflashplugin support (which wasn't even installed):

sudo apt-get install --reinstall pulseaudio libflashsupport

and then changed everything to pulseaudio in "system->preferences->audio settings".
This advice was posted here.
Now amarok and flash run at the same time and everything seems to be fine.

source :

See also

Change Emacs background and foreground colors

Sometimes Emacs starts with a bizzare black background. If you want the familiar black text on white background proceed as follows.

While in Emacs
Type, set-background-color (like this : set(space)background(space)color(enter) )
Type, Cyan
(This step is neccessary so that the text remains visible while swapping the background and foreground colors. IF you want you can skip this step.)
Type, set-foreground-color (like this : set(space)foreground(space)color(enter) )
Type, black
Type, set-background-color (like this : set(space)background(space)color(enter) )
Type, white


For a complete guide to Emacs see

But I still don't know how to make this effect permanent. Someone suggested to write to the .emacs file directly. I haven't tried it yet.

Unable to save or download files in firefox

source :

Choose a different download folder

Firefox will automatically download files to the Desktop unless you've selected a different download folder or you've set Firefox to ask where to save every file. Download problems may be related to the selected download location, for example, the download folder may contain a lot of images [3] or it may no longer be accessible [4]. (To fix problems related to the last-selected download folder, you can open about:config, right-click on the preference and select "Reset".)

To choose a different download folder, click Tools -> Options in the Firefox menu and, under "Main / Downloads" (or "Downloads / Download Folder" in Firefox 1.5 and earlier) select the "Save files to" option (if not already selected) and click the "Browse" button.
Reset download folder

Firefox may have lost track of which folder to…

Command to see linux version

I had always used
uname -a
to see which linux a computer in running but here are some better alternatives. They give a lot more useful info.


To get full info on the version of Linux on your system type,

lsb_release -a

The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation (merger of the Free Standards Group and the Open Source Development Labs) to standardize the internal structure of Linux-based operating systems

Other commands having same effect
cat /etc/redhat-version
cat /etc/issue
cat /etc/lsb-release

Multimedia softwares for Linux

For all Debian-Users go to debian multimedia repository(

Multimedia authoring tools :

Cinnelera - best but too advance and technical.
Avidemux - Virtualdub alternative for linux.
KmPg2 - - convert anything to MPEG-2 for DVD use.
DVDAuthor Wizard - - make DVD from MPEG-2 clips, with menus etc.
dvdrip (Perl frontend to transcode)
mencoder (must have)
xine (must have)
ffmpeg (must have)

Video players:

mplayer - kmplayer, smplayer. (must have)
vlc media player (must have)
realplayer (must have)

These four will mostly cover all of the video needs of an average Linux user.

Music players:

amarok (must have)
beep media player
xmms2 - xmms is now only a backend. (must have)
esperanza - frontend to xmms2.

Join avi files in linux

The easy way is to use avimerge. Still I include both methods.

Method 1 :

source :

Merge, join two or more avi files

For all this to work you need the transcode package. So install (or make sure that it is there)

yum install transcode


1. Open up a terminal
2. Go to the directory where the files are (this is just to make things simpler)
3. Assuming that the file you want the result to be is named foo.avi, and you have two smaller files you want to merge (in order) named foo1.avi and foo2.avi, enter the following command:

avimerge -o foo.avi -i foo1.avi foo2.avi

Method 2 :

source :

How to join multiple .avi or .mpg files

sudo apt-get install mencoder mplayer

Now that the hard part is out of the way, we’re going to make use of the wonderful cat command. I’d renamed each Bloodspell video as b1.avi - b7.avi. Now to string them all end to en…

command to see Linux version


lsb_release -a

The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation (merger of the Free Standards Group and the Open Source Development Labs) to standardize the internal structure of Linux-based operating systems.

Other commands having same effect
cat /etc/redhat-version
cat /etc/issue
cat /etc/lsb-release

The traveler whose journey has ended has achieved greatness above all

A short story on greatness.

One day during his exile emperor Asoka was resting when a vagabond comes up to him and says "You are no ordinary traveller. You have greatness written over your forehead."
Asoka was then brooding over how to regain his throne, so he asks "Greatness as in a King?"
Traveler : "No."
Asoka : "Who can be greater than a king?"
The traveler says "The traveler whose journey has ended has achieved greatness above all." and leaves.
It took Asoka a lifetime of bloodshed to learn the true meaning of this statement.

Howto merge pdf files in Linux

Many times we download a number of pdf files which are supposed to be part of a single file. This is the case with the lecture notes that we download from some professors website. And it is desirable to have a single pdf file instead of bits and pieces of the chapters. The following procedure will explain howto acheive this.(Linux only)

You need to have ghostscript installed in your linux box.

First goto the folder and ls only the needed pdf files like -
ls -x 0*.pdf
This will create a list of files in sequential format, easy to select. All that is needed is to select each line and middle click paste after the command
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf

example :-

If gs is installed then type in command line the following command -

$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf 00.pdf 01.pdf 02.pdf 03.pdf 04.pdf 05.pdf 06.pdf 07.pdf 08.pdf 09.pdf 10.pdf 11.pdf 12.pdf 13.pdf 14.pdf 15.pdf

The bold ones the pdf files which …

Howto write equations in latex in Blogs or websites

1. For websites it is a little bit non-trivial. Just write the equations in Mathematica and save as xml+MathML type. Now open that xml file in any text editor and copy paste the portion starting with in the corresponding HTML code. That's it.

2. For blogs it's much easier. Just write the equation in LaTeX and sandwitch it between

like this \frac{1}{\kappa} \int d^{N+1}x \sqrt{-G} \ \exp^{-2\phi} \left[ c %2B R \right]+&bg=ffffff&fg=333333&s=0 +&bg=ffffff&fg=333333&s=0

This gives the following equation.

This will generate the picture of the equation dynamically. Now add the image URL to the blog.

One word of caution. Some of the characters are not easily recognised, like =, +. For them use the HEX code instead. In the link presented above I have used the HEX code %3D instead of = . A quick way to get the HEX code is to go here (…
My first blog on a science topic which I know nothing about. So don't take whatever I write very seriously. (Disclaimer: Although I have taken the taken pain to see the correctness of the material whatever is written below might be incorrect because first I know little about CMB. )

users with a UID of less than 1000 not visible in User and Group maintenance (Ubuntu)

[Bug 70850] Re: [users-admin] show all users checkbox is gone and there is no way to view users with a UID of less than 1000

source :

I need user ID=500 to work. It's easy to create a new user with ID=500. Go back to create another user and 500 is gone. It's in /etc/passwd but not visible in User and Group maintenance. I can log in as user 500 but in Login Screen maintenance user 500 can not be set to auto login.
Experimenting I see any user ID I create of 999 or less is invisible. Any user ID I create of 1001 or more is visible.

The work around is to edit "/etc/login.defs".

sudo gedit /etc/login.defs

**change this section:

# Min/max values for automatic uid selection in useradd
UID_MIN 1000 (change 1000 to 500 or perhaps 1)

So the bottomline is give your UID > 1000 always.

Prevent Linux (/Unix) console from getting garbled

If you cat some binary files for instance, it corrupts the shell, the entire window gets garbled and you need to close it.

Its a known issue and has been a known issue for ages.Sometimes people accidentally do it when coding for instance, you accidentally cat your binary instead of your output.

Solution is to reset the terminal.
$ reset
source :

Encrypting a file in linux

To encrypt single file, use command gpg as follows:

$ gpg -c filename

To encrypt file, type the command:

$ gpg -c


Enter passphrase:
Repeat passphrase:

This will create a file.

Option: -c : Encrypt with symmetric cipher.

Caution if you ever forgot your password aka passphrase, you cannot recover the data as it use very strong encryption.

Task: decrypt file

To decrypt file use gpg command:

$ gpg


gpg: CAST5 encrypted data
Enter passphrase:

Decrypt file and write output to file you can run command:

$ gpg –o

Remember if file extension is .asc, it is a ASCII encrypted file and if file extension is .gpg, it is a binary encrypted file.

Mathematica problem in Linux (Hardy)

1. Backspace or delete working until i turn numlock off.

This is an old mathematica bug fised in recent versions. The Mod2 key is probably mapped to your Num Lock key. If the Mod2 keysym is mapped to Num Lock, hit the Num Lock key to turn it off.

Depressing Mod2 turns on an undocumented feature of the X front end - global selection. When global selection is activated, the mouse pointer will change from an I-beam to a hand. You cannot place a text edit cursor within a cell in this mode, but if you select a cell of a given style, then all cells of that style will be selected.

To avoid this situation in the future, simply remap Mod2 to another key using xmodmap or some other keyboard configuration utility.

It appears that by default Mandrake Linux 8 sets the Num Lock key on and maps it to Mod2. Therefore, it is suggested that you remap Mod2 to another key as described above.

source :

If you want to configur…

Kane and Abel by Jeffrey Archer

Today I finished reading Kane and Abel by Jeffrey Archer. It is a good book. But I believe it is 200 pages too long. Only the beginning 100 pages where Abel fights desperately for freedom from Russian prison camps and the last 100 pages where the lifelong feud between Kane and Abel comes to a dramatic conclusion are gripping and the rest of the book is long and tiresome.
It also has sequel The ProdigalDaughter. I think I would skip it after the painful hours of reading this book.

Create HTML from a list of links

Sometimes we have a list of links and we like to convert it into HTML. Take the following example. Suppose I have a list of links as -

and I want them not as text but as links. For that I have to
Manually type tag for each.
I can paste them in MSWord and click enter after each link and MSWord would automatically make them hyperlinks. That works really good.But what of I have 50 links or more? It becomes a laborious process so I wrote a small VBA script to do the job.
I just paste the list of links in first column of an empty Excel sheet. Then paste the following code in Visual Basic Editor for Excel and run it as a Macro or we can make a command button for it,
whatever procedure suits anyone. After running a…

Encrypting a file in linux

Encrypting a file in linux

To encrypt single file, use command gpg as follows:
$ gpg -c filename

To encrypt file, type the command:
$ gpg -c

Enter passphrase:
Repeat passphrase:

This will create a file.

* -c : Encrypt with symmetric cipher.

Caution if you ever forgot your password aka passphrase, you cannot recover the data as it use very strong encryption.
Task: decrypt file

To decrypt file use gpg command:
$ gpg

gpg: CAST5 encrypted data
Enter passphrase:

Decrypt file and write output to file you can run command:
$ gpg –o
Remember if file extension is .asc, it is a ASCII encrypted file and if file extension is .gpg, it is a binary encrypted file.

Rip DVDs in Linux

DVD burning

Source :

Is there a command available to install something in ubuntu that decrypts dvd's so I can back-up my dvd movies?

Install dvdbackup from the repository.

Then insert your DVD movie in the drive and type this in the terminal:

dvdbackup -i /dev/dvd -M -o dir/

This will backup the whole DVD movie with extras and menus, etc. You might want to have a Dual layer burner for this too. It will put the backup in the directory that you put in place of dir/.

example: dvdbackup -i /dev/dvd -M -o backupmovie/

After it finishes this then insert your blank DVD disc into the drive and type from terminal:

growisofs -speed 1 -dvd-compat -Z /dev/dvdrw -dvd-video dir/

example using the backupmovie/ directory that contained my backup would be:

growisofs -speed 1 -dvd-compat -Z /dev/dvdrw -dvd-video backupmovie/

The dvdbackup command will put into the backupmovie/ subdirectory the disc title of the movie. So be sure to include that at the end of the …

Firefox 3 Beta 5 sees huge improvements.

I don't have time to discuss every feature nor do I have time to write long sentences. So, instead I would directly copy and paste from a reliable web source all the great things about the new Firefox which I think everybody should notice. The following are not my own words and I do not take any credit of originality and to circumvent plagiarizing I give link to the original source of information. People interested might want to read the entire article : But, my article would contain only short description of the new features for the guys short of time.

1. The Places system, which was originally planned for Firefox 2, is a cohesive storage framework that uses a SQLite database rather than flat files and unifies bookmark and history storage. New user interfaces for bookmark management have also been created to give users access to the new capabilities—like support for bookmark tagging—that are made …

Music (Mp3) Download Sites

Mp3 Download Sites
Why does WinSCP/F-Secure error/hang after successfully logging in?F-Secure gives the following error: "File transfer server could not be started or it exited unexpectedly. Exit value 0 was returned."WinSCP: "Recieved too large SFTP packet. Max supported packet size is XXXXX bytes. This error is typically caused by message printed from startup script (like .profile). This message may start with..."

Adding certain lockers or running certain programs at login time by changing your UNIX dotfiles (.mycshrc, .cshrc, and .login) can cause SFTP/SCP programs to error/hang.

For example, if the .cshrc file looks like

alias ld 'll | grep "^d" '
# display calender

Remove the lines for cal . Any program which is specified to run on login causes the sftp file transfer to exit abruptly.

source : Troubleshooting Remote Access Errors

Want some disposable mail address ?

Did you ever find yourself wanting to register an account somewhere, and that somewhere asked for your e-mail address to confirm something? You know you’re gonna get spammed by doing it, but you don’t have any choice - you need that account now; maybe in future you won’t, but you will now. What you need is a disposable mail ID. Any one of the following would help you in having a temporary, disposable mail address.




source : Our picks

Scrap multiple friends

To scrap multiple friends there is a script file that is widely available for free by Rodrigo. But most websites grab it and change the code to provide a link to their website, which is good, since many people come to know of this script with this. But sometimes you might want to do without that extra link added by these websites. So, I edited the script and deleted the link part. It's pretty straightforwad to do so.
To send multiple scraps login to orkut and in the same window/tab paste the following javascript code

Make your Firefox extensions work

Many times we run across Firefox extensions which are are not compatible with the version that we are using. But there's always a workaround. Two of them actually. The first one -
Type about:config into Firefox's address bar and click the "I'll be careful, I promise!" button.Right-click anywhere. Choose New>Boolean. Make the name of your new config value extensions.checkCompatibility and set it to false.Make another new boolean pair called extensions.checkUpdateSecurity and set the value to false. Restart Firefox.The second one -

Download the *.jar , *.xpi file.Open the file with WinRAR.Look for the file install.rdf. It contains the information about which versions of Firefox it is compatible with.Edit the file in Notepad. For that you may have to copy the file to hard disk, edit it,save it, then copy it back to the file with WinRAR.Change the x.0.0.* in <em:maxVersion> x.0.0.* < /em:maxVersion > to 4.0.0.* or any higher number that you think f…

A few reviews of a few books that I have read

Da Vinci Code
Da Vinci Code is must read for everybody nowadays. It's a kind of fashion. But it is a great book. Extremely well-researched and well-written. Sometimes the facts are presented tend to blur the line between reality and fiction. Still it's a great read.

Master of the Game
Excellent book. Best book by Sidney Sheldon that I've read.

Angels and Demons
One word describes it - unputdownable. Simply can't put the book down once you start reading it.
So make sure you have plenty of time for a quiet uninterrupted read before starting.

How do you delete the history in RUN command of WIndows XP?

Method 1:

This answer is for a windows xp sysem:

There are two ways to get to the Control Panel dialog for the Start Menu:

1. select the control panel, then select taskbar and start menu control
panel applet, then select "start menu"
2. OR: right click on the start menu and select properties

From the "start menu" tab:

Click on "customize", select the "advanced" tab, and finally, click on the
"clear list" button.

Method 2:

you can find them in the registry:


there you can delete the ones you don't want others to see