Search This Blog

Tuesday, March 27, 2007

exiting full screen modes

Q. How to exit the full screen mode in VNC viewer?

A. Inside the vnc session press < F8 > and then choose "Exit Viewer". Tested this on xvnc4viewer 4.1.1+X4.3.0-2 , running on Debian Etch (currently testing).

Q. How to exit the full screen mode in NX?

A. Inside the nxclient session, go to the top right corner. Left mouse clicking there will iconify the NX session. Tested this on nxclient 2.1.0-17, running on Debian Etch (currently testing).

Related links :-
  • http://wiki.archlinux.org/index.php/FreeNX

Monday, March 26, 2007

search for one word and exclude another word in vim

In vim, to find all the lines containing the word 'condition' (without the quotes) and to exclude those lines containing 'condition number', install the LogiPat plugin available at http://vim.sourceforge.net/scripts/script.php?script_id=1290

The sample command looks like

:LP "condition" & !"condition_number"

Related links
  • Download and installation instructions http://vim.sourceforge.net/scripts/script.php?script_id=1290
  • LogiPat on Author's homepage http://mysite.verizon.net/astronaut/vim/index.html#LOGIPAT
  • Discussion on vim mailing list http://tech.groups.yahoo.com/group/vim/message/78897

Monday, March 19, 2007

Disable system bell

1. The annoying system beep on tab completions can be disabled in Debian by adding the following lines to ~/.inputrc
$cat /home/rajulocal/.inputrc
# do not bell on tab-completion
set bell-style none
set bell-style visible
Unlike "xset b 0", the above hack works even if you are not running X.

Tested on Debian Etch (currently stable), on

$bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

2. To disable the annoying bell sound in vim, gvim add the following line to ~/.vimrc
set vb t_vb=
More info for vim can be found at
:help visualbell
Tested on Debian Etch (currently stable), on vim 7.0.122

3. To disable the system bell sounds in tcsh, add the following line to ~/.cshrc
set nobeep
Tested it on Solaris 8, tcsh

Sunday, March 18, 2007

Tuesday, March 06, 2007

convert mp3 to wav

place the following script in ~/bin and call it mp3towav.

guest@kusumanchi:~/bin$ cat mp3towav
#! /bin/sh

# bash script to convert .mp3 files to .wav files
# works even if the files have spaces in their names.
#
# Author : Kamaraju Kusumanchi
# Email : kamaraju at gmail dot com
#
# Usage : cd into the directory containing .mp3 files and then execute
# this.
#
# Ref :- Linux Multimedia Hacks, Tips & Tools for Taming Images, Audio and
# Video by Kyle Rankin, pg-100
#

for i in *.mp3; do
lame --decode "$i" "`basename "$i" .mp3`".wav
done
Make the script executable
guest@kusumanchi:~/bin$ chmod +x mp3towav
guest@kusumanchi:~/bin$ ls -al mp3towav
-rwxr-xr-x 1 guest guest 450 2007-03-06 20:19 mp3towav
Cd into the directory containing .mp3 files
guest@kusumanchi:~/bin$ cd /entertainment/telugu_songs/godavari/
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ls -1 *mp3
01 - Ramachakkani Sitaki.mp3
02 - Uppongele Godavari.mp3
03 - Manasavacha.mp3
04 - Manasaa Gelupu.mp3
05 - Tippulu Tappulu.mp3
06 - Andamgaalena.mp3
Run the script
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ~/bin/mp3towav
There will be messages such as
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
input: 01 - Ramachakkani Sitaki.mp3
(44.1 kHz, 2 channels, MPEG-1 Layer III)
output: 01 - Ramachakkani Sitaki.wav (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Frame# 8878/8859 128 kbps L R
The corresponding .wav files will be created once the script completes. The .mp3 files are unmodified.
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ls -1 *wav
01 - Ramachakkani Sitaki.wav
02 - Uppongele Godavari.wav
03 - Manasavacha.wav
04 - Manasaa Gelupu.wav
05 - Tippulu Tappulu.wav
06 - Andamgaalena.wav
Programs like k3b can now be used to burn these wave files onto a CD/DVD.

ఎన్ని సార్లు విన్నా ఇంకా ఇంకా వినాలనిపించే ...

పల్లవి:
నీల గగనా ఘనవిచలనా ధరణిజా శ్రీ రమణ
మధుర వదనా నళిన నయనా మనవి వినరా రామా!

రామ చక్కని సీతకి అరచేత గోరింట
ఇంత చక్కని చుక్కకి ఇంకెవరు మొగుడంట
రామ చక్కని సీతకి

చరణం 1
ఉడత వీపున వేలు విడిచిన పుడమి అల్లుడు రాముడే
ఎడమ చేతను శివుని విల్లును ఎత్తినా రాముడే
ఎత్తగలడా సీత జడను తాళి కట్టే వేళలొ
రామ చక్కని సీతకి

చరణం 2
ఎర్ర జాబిలి చేయి గిల్లి రాముడేడని అడుగుతుంటె
చూడలేదని పెదవి చెప్పె చెప్పలేమని కనులు చెప్పే
నల్లపూసైనాడు దేవుడు నల్లనీ రఘురాముడు
రామ చక్కని సీతకి


చరణం 3
చుక్కనడిగా దిక్కునడిగా చెమ్మగిల్లిన చూపునడిగా
నీరు పొంగిన కనులలోన నీటి తెరలే అడ్డునిలిచె
చూసుకోమని మనసు తెలిపె మనసు మాటలు కాదుగా

రామ చక్కని సీతకి అరచేత గోరింట
ఇంత చక్కని చుక్కకి ఇంక ఎవరు మొగుడంట
రామ చక్కని సీతకి

ఇందువదనా కుందరదనా మందగమనా భామా
ఎందువలన ఇందువదనా ఇంతమదనా ప్రేమా ??

ఈ పాట "గోదావరి" అను సినిమా లోనిది. వేటూరి గారు రచించారు. గాయత్రి గారు పాడారు. చాలా మంచి పాట కదూ? మీకు కూడా ఇది ఇష్టమేనా?

Monday, March 05, 2007

gnuplot realted links

Some useful links related to gnuplot

various ways of reading man pages

There are many ways to read man pages in Debian.

  1. man pagename
  2. In konqueror, man:pagename
  3. In vim, :Man pagename
  4. use vman, wman as described in Using vim as a man page reader
  5. In emacs, M-x man
  6. Install man2html and then go to http://localhost/cgi-bin/man/man2html in any browser
  7. xman -notopbox -bothshown &

Sunday, March 04, 2007

My experience with knujon

On March 4, 2007 I came across user damaging spammer provider thread on spamcop forums. I decided to give knujon a try after going through their website.

I registered my gmail address at http://www.knujon.com/register.html after reading their FAQ.

After the registration, I was told to send the junk emails to knujon@coldrain.net

Submitting Junk emails to knujon is explained in http://www.knujon.com/howtosend.html and instructions specific to Gmail are at http://www.knujon.com/howtosend.html#Gmail .

Install python and libgmail which are needed to run the gknujon script at http://www.submanifold.be/triade/misc/gknujon/gknujon.html
# aptitude install python python-libgmail
Get the python script
$ mkdir knujon
$ cd knujon/
$ wget http://www.submanifold.be/triade/misc/gknujon/bin/gknujon.zip
$ unzip gknujon.zip
Go through all the files generated.

$ python gknujon.py -h
provides some help.

Sample command that I use looks like
$ python gknujon.py -l username@gmail.com -p password -r knujon@coldrain.net

See gknujon.bat for sample commands and other options.

The script is really easy to use. The interaction looks like

$ python gknujon.py -l username@gmail.com -p password -r knujon@coldrain.net
Login successful
- 89 unread messages found in spam folder
- downloading spam message (89/89)
- Zipping spam message (89/89)
- Sent report (2/2)
- There are 2 spam reports in your sent mail
Trash the spam reports? (y/n)
or Press Enter to quit: n
- There are 0 SEC-delivery notifications in your inbox
- There are 89 messages in your spam folder
Empty spam folder? (y/n)
or Press Enter to quit: y
trashing (89/89) : Get it !...
Press Enter to quit...
On Mar 10, 2007 I received a personal email address from knujon to which I can forward all my spam emails. The python script is still useful and the only change is in the "reporting address" field passed as an argument to -r.

Received my first report from knujon on Mar 15, 2007, second on Mar 21, 2007, third on Mar 30, 2007 etc.,

Currently my reporting results are
Sites reported by you: 110
Pending Suspensions: 46
Completed Suspensions: 6
Report Date: 5/13/2005

So to conclude, Knujon is definitely doing a great job in eliminating the spammy websites. I will be updating the above statistics as and when I get new reports from Knujon.

Amazing Nike ad

This is an amazing ad from Nike ( http://www.youtube.com/watch?v=Mpvuz8gg79Q ) involving cricket. With 2007 Cricket world cup matches starting from March 13 IST, it only tells how much everyone is looking forward to it...

Blog Archive

Followers