Monday, January 26, 2009

Increasing Wanda's Vocabulary

Wanda is the fortune-telling fish you can add onto your *nix menu bar. When you click on her, she displays a random quote from William Shakespeare, Mark Twain, or other humorous quotes and riddles. If you don't have it, right-click your menu bar, click Add to Panel, select Fish and click Add.

Behind the scenes, Wanda relies on the "fortune" command line application that displays random quotes from the fortunes file located at /usr/share/games/fortunes. You can view a list of all messages used by fortune from the file /usr/share/games/fortunes/fortunes. To edit this file, do the following:

cd /usr/share/games/fortunes
sudo vi fortunes

At this point, the vi editor starts up. If you aren't familiar with the vi editor, you can use gedit instead - type "gedit fortunes" instead of "vi fortunes". You have to end every entry with a "%" sign on a blank line. After you've edited and saved the file, type the following command

sudo strfile fortunes fortunes.dat

Now, Wanda (and the command-line fortune) will display the new messages which could be anything from the Java Factoid of the Day, or a quote from Star Wars - "Who's the more foolish: The fool, or the fool who follows him?".

1 comment:

Anjali said...

Nice Blog and the Story was Really interesting.Nice way to increase vocabulary. Thank you.