48

rock.com

Thursday, September 21, 2006

Delete and End key problem - Linux

After a thrilling exploration, the crack has been finally found out!

If you are a typical non Emacs user on linux and experiencing difficulties over working on TCShell(CShell with command line editing) on linux, for eg., not finding your end and del key to work as expected.... Here is the solution for you!

If you are using the latest Linux distros, from redhat 9 atleast, you are correct in assuming that delete key(which wasnot part of orginial unix) and other keys like end,etc are mapped correctly. I mean, it is bound properly in the key map and delete is mapped to "delete-right", back space is mapped to "delete-left", end is mapped to "end-of-line". So no issues with meddling up with the key bindings and overriding the key maps for XTerm,etc. (It took a while for me to figure this out.)

So what is the problem?
Here its the shell that is the culprit, but not the XTerm as you would assume.

THE FIX:

The problem here is in understanding that CShell has the Emacs key binding as default and all the key bindings are in compliant with that. And you should acknowledge that, Ctrl + d will do the delete and Ctrl + e will do the end-of-line much like a typical Emacs. But a mere change to the vi key binding(by executing "bindkey -v" while the emacs key binding would be reverted back by "bindkey -e") won't do as still the typical del and end key problem persist.

So the fix would be to override the key bindings of the shell and not of the terminal!

The normal user defined information for the respective terminals are present in their respective rc files, you may add one in your ~/ for individual preference or in the /etc for system wide change.

Tip 1) Press Ctrl+V and then the key to find the key binding for that key. For eg. if you press Ctrl+V and then press Home key, you should be getting ^[[1~.
Tip 2) Execute bindkey to find the current key bindings of all the key sequence in your current terminal view.

So the steps would be:

0) First you must understand that, cshell has the default Emacs key binding. Better read the manpage of cshell(say man csh)
1) Create a new file in ~/ with the name .cshrc if one doesn't exist.
2) Add the following lines in your .cshrc file:

if ($term == "xterm" $term == "vt100") then

bindkey "\e[3~" delete-char
bindkey "\e[4~" end-of-line
endif

3) You can add further lines to change the behaviour of any other keys as u wish!

Happy linuxing and happy Firefoxing!! [:D]

Tuesday, September 12, 2006

Tere naam se jee looo...

This is a wonderful song! Just listen to it..and feel it..!

Name(Easy way to search over internet) : Teri Deewani
Album : Kailasa
Lyrics : (courtesy: http://abhask.blogspot.com)

Preet ki lath mohe aaisi laagi
Ho gayi main matwaali
Bal bal jaaun apane piya ko
Ke main jaaun vaari vaari
Mohe sudh budh naa rahe tan mann ki
Yeh toh jaane duniya saari
Bebas aur laachar phiru main
Haari main dil haari

Tere naam se jee loon
Tere naam se marr jaaun
Teri jaan ke sadke mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ri ha ha ri ho gayi main
Teri deewani deewani

Ishq junoon jab hadh se badh jaaye
Hanste hanste aashiq suli chadh jaaye
Ishq ka jaadu sar chadhkar bole
Khoob laga lo pehre raste rab khole
Yahi ishq ki marzi hain
Yahi rab ki marzi hain
Tere bin jeena kaisa
Tune kya kar dala marr gayi main mitt gayi main
Ho ri ha ha ri ho gayi main
Teri deewani deewani

Ke main rang rangili deewani
Ke main albeli main mastani
Gaaun bajaaun sabko rijhaaun
He peer-dharam se begaani
Ke main deewani main deewani
Tere naam se jee loon tere naam se marr jaaun
Tere jaan ke sadle mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ri ha ha ri ho gayi main
Teri deewani deewani

Sunday, September 10, 2006

Download Google Videos

How to download google videos?? U must have thot of this some or the other time, I believe??

1) Open the video u wish to view/download over google videos site.
2) On the right pane, where you have many links to download .. blah blah.. right click and say view source
3) You get a huge text. search for the keyword "videodownload?". select the whole of the href tag containing the searched keyword.

For eg:
The tag including for the above keyword is:

id="macdownloadlink" href="http://vp.video.google.com/videodownload?version=0&secureurl=uAAAABYif6xW6kaDxaL3itt0kRZ
C7dbVGAr30TbMGK3bk8QnwfuI8RJ8ZArM9npn5S0RpYvHiO9LlO7xp-Um_Q&sigh=5HO7-xqPVRQ_FY7ZPq9J36E6kpE&
begin=0&len=2763154&docid=-2939138234670623394">this link

From this extract the href value, which is:
http://vp.video.google.com/videodownload?version=0&secureurl=uAAAABYif6xW6kaDxaL3itt0kRZ
C7dbVGAr30TbMGK3bk8QnwfuI8RJ8ZArM9npn5S0RpYvHiO9LlO7xp-Um_Q&sigh=5HO7-xqPVRQ_FY7ZPq9J36E6kpE&
begin=0&len=2763154&docid=-2939138234670623394

From this, remove "amp;" wherever u find them and paste that in a browser..to download the video..!

U r done!

Saturday, September 09, 2006

Koove Programming Contest!

The first orkut programming challenge is sponsored by koove.

Here are the links and some important dates.
Programming Contest site: http://www.koove.com/programming-contest/

Contest begins on Friday Sept 15,2006. and it goes in phases till 12th Feb 2007!!