Tuesday, February 07, 2006

Alias

Alias is a really useful command especially for lazy guys like me. Alias literally means "other name", and in linux also it serves the same purpose.When u don't wanna type long commands , what you can do is simply type an alias for it, it's just like making a shortcut.
For example, considering the folowing line

alias movie='mplayer /mnt/win_e/movies/English/Documentary.avi'

If u wanna watch a movie called Documentary which is in the folder /mnt/win_e/movies/English using mplayer , you have to type the full command within the quotes, but if u set an alias like movie, you just need to type movie in terminal.So simple and easy .The alias need not be a word , u can even put letters as aliases.

The aliases which u type last only for the current session, so in order to make them permanent, u need 2 add these aliases in ur bashrc file.
Go to the home folder of which ever user u wanna add the aliases.Using n-e editor open .bashrc file

vim ~/.bashrc

just add the command in the above mentioned format in the .bashrc file and save it.Next time when u restart ur comp , the alias will be a permanent fixture in your path.

few more examples for alias usage:
alias byebye='logout'


So when u type byebye , the logout command is executed. So simple isn't it.
For more info on bashrc and alias i would suggedt u Google.
Else in console type
man alias

Thursday, January 19, 2006

Freedom

In my previous blog I have mentioned about your-freedom.It is a pretty good software used for tunneling, and its GUI does help a lot.Generally the GCJ package available in most of the Linux distros( Fedora and Debian in particular ) do not support the your-freedom applet as well as the Sun's JDK package.Download the latest JDK edition from the Sun's home page.follow the instructions given on that page.

Follow the given instructions in order to make your-freedom work on ur PC

  • I assume that you have installed it in /usr/local/java/
  • type /usr/local/java/jdk1.5/bin/java -jar your-freedom-folder/freedom.jar
You can set an alias for the full command .Aliases are shortcuts, you can assign any command to perform a given task, more on aliases later.Open ~/.bashrc file and add the following line

alias x='/usr/local/java/jdk1.5/bin/java -jar your-freedom-folder/freedom.jar'

The above command adds x in your commands list.Next time you open your terminal u just need to type "x".You need not ype x , you can put any other character as well , but make sure that its not a system command.

Open gaim and in preferences change the proxy settings to SOCKS 5 and the server address as 127.0.0.1 and port 1080.In the yahoo pager address port you have to add 119 , and select proxy settings as SOCKS5

Thats it over your gaim is up and running.