Feeds:
Posts
Comments

Archive for the ‘Gnu/Linux’ Category

Geary is a lightweight email client for gnome desktop. To install geary in fedora 17 run the following commands as root

#wget -P /etc/yum.repos.d  http://repos.fedorapeople.org/repos/thm/geary/fedora-geary.repo

#yum install geary

Read Full Post »

With the WA3002G4 wireless router i got recently from my friend i made a wifi hotspot in home. Haven’t been downloading a lot since my script to reboot old teracom router was not working with the new one.Thinking that I should do something on the day which will come only in every four years I modified the old script to work with the new wireless router and I am sharing it here.

#!/usr/bin/env expect

set username admin
set pass admin
set host 192.168.1.1

spawn telnet ${host}

expect -re "Login:"
send "${username}\r"

expect -re "Password:"
send "${pass}\r"

expect -re "Main Menu"
send "13\r"
send "1\r"
expect eof 

Read Full Post »

Yesterday my ubuntu installation went wrong when i misplaced an essential lib. Even the tab completion feature in gnome-terminal and cp, mv commands were not working. Some how i backed up some *important files* i stored in my root filesystem to my usb drive and installed ubuntu again, and moved back the *important files* to root filesystem. But again ubuntu stopped working after i installed some debs. But this time before reinstalling ubuntu i forgot to backup the important files from my root filesystem to the pendrive. I realized this only after the installation process reached 50% . What to do???. Today classes were suspended at 12 because of Ayodhya verdict, so came home earlier, sat in front of the lappy and started googling. While searching i found a tool named ntfsundelete, but really disppointed when i came to know that it works only for ntfs filesystems. My pendrive is having Fat32 filesystem. Again continued searching and found a blog discussing about a component of testdisk application named photorec. I ran apt-get install testdisk and photorec got installed. i ran photorec at the command line and it told me to run it as root. so ran it as root and it asked me to select the disk. i selected my pendrive, it needed some info about parition table and the directory where the recovered files should be stored which was defaulted to home directory. And it started recovering. When the recovery process completed there was about 45 directories in my home directory. After spending some time in searching those directories i found 4 out of 5 *important files*. Four is a lot better than none, isnt it?.. thanks photorec!

Read Full Post »

Last wednesday night my friend Adhil called me to ask if he can use my internet connection to send some sms using his bulk sms account for his cousin. He wanted to send them that night itself as the govt was about to freeze bulk sms account from 12am due to Ayodhya verdict. I agreed and he came to my home with Shibin (sorry shib.in, yeah! recently he registered the domain shib.in to put coming soon banner 😀 ). When they reached home only i knew that my internet connection is down due to some problem in the phone line (it is a hobby of monkeys around here to bite down phone lines). There is no question of going to internet cafe as it was already 10:30 pm and the nearest cafe is 12kms away. Surprisingly Shibin’s netbook detected a wifi connection named wifi-anil. He tried to connect, it got connected without requiring authentication. He typed google.com in a browser and tried to load, yes it got loaded.I opened the closed window doors in my room for better reception and Adhil without wasting a single second did his work. Even though his bulk sms account got banned by 11 30 he was able to send some part of messages. And thats the first time i am stealing someone else’s internet connection. The next day itself i added WPA authentication to my wireless router.

Read Full Post »

Atlast i came up with a real rhythmbox plugin for setting the status message in pidgin as the current song title playing in Rhythmbox music player .I wrote it a few month before and was using it. Thought of sharing it before but didnt get time. Actually i forgot about my blog when i started microblogging. From now onwards i will be updating this blog regularly.( this is what i wanted to do always 😀 )

Download the plugin from here : http://ragsagar.freehostia.com/rb-nowplaying.tar.gz
To install it.
1) Extract the tarball.
2) Copy it to ~/.gnome2/rhythmbox/plugins/ (if no such directories exists, create them)
3) Open rhythmbox. Edit -> Plugins
4) Check ‘Now Playing Pidgin’

That’s it. If you are facing any problems do comment.

Read Full Post »

Iam back with another shell script written for my sis as part of her assignment. This time what i wanted to do is to count the unique words in a file and to print it in alphabetical order. For that i iterated through the words in the given file using for loop, filtered out the unique words using sort -u and counted it using wc -l.

#!/usr/bin/bash
echo Enter the filename
read fn

for WORD in $(cat $fn)
do
	echo "$WORD"
done | sort -u | wc -l	

 for WORD in $(cat $fn)
 do
  echo "$WORD "
 done | sort -u

Hope this will help someone to do his/her assignment 😀

Read Full Post »

Ok here is a script to cipher text contents in a file. It will shift the letters to the fifth letter to its right, ie if a is the letter, it will change it to f.

echo Enter the filename
read fn

while read -n 1 letter
do
  case $letter in
    '')
      echo
    ;;
    ' ')
      printf ' '
    ;;
	'.')
	  printf '.'
	;;
    *)
      asci=$(printf %d \'$letter)
      ((asci+=5))
      fwd_letter=$(printf "\\$(printf "%03o" $asci)")
      printf "$fwd_letter"
    ;;
  esac
done < $fn

You can decipher it by just replacing the + in 18th line to
Note : This is a assignment my sis got from IGNOU. I hope this will help someone to do his/her assignment 🙂

Read Full Post »

Older Posts »

%d bloggers like this: