Install fortune cookies on Ubuntu

May 5th, 2009 Posted in linux, tips, ubuntu

I’ve just finished installation of Ubuntu 9.04 (Jaunty) 64-bit on my inspiron 1520.
And let me tell you ext4 is fast … and jaunty is very sleek and nice looking and fast compared to earlier versions or others.

Do you love to get fortune cookies in your linux ?
Adding them as signature to your emails ?
Most of the times the signatures/cookies provided are absolutely awesome and fit perfectly for the situation.
(Or you can obviously try again to get more relevant quote/cookie)

The easiest way to install fortune cookie on ubuntu is as follows :

sudo apt-get install fortune-mod fortunes

It will install many fortune cookies at location : /usr/share/games/fortunes
The above two packages contain enough cookies which should be sufficient for most of our needs.

The usage is as follows :

mayavi@mayavi-laptop:~$ /usr/games/fortune
Talent does what it can.
Genius does what it must.
You do what you get paid to do.

You can get specific topic fortune using following command :

mayavi@mayavi-laptop:~$ /usr/games/fortune linux
If Bill Gates is the Devil then Linus Torvalds must be the Messiah.
– Unknown source

You can combine two or more categories in the above command to get more diverse options.

You can create your own fortune cookies or add to existing ones.

For e.g. to add new quote to Linux, open up a file   /usr/share/games/fortunes/linux

and add your quote in this file between %

I’ve added Next  quote :     %  “1f u c4n r34d th1s u r34lly n33d t0 g37 l41d” %

Post this run following command :

root@mayavi-laptop:/usr/share/games/fortunes# strfile linux
“linux.dat” created
There were 336 strings
Longest string: 1177 bytes
Shortest string: 39 bytes

And you are ready to use your new quotes/files

Add this to you signature in evolution/thunderbird :-)


One Response to “Install fortune cookies on Ubuntu”

  1. Surrey Wedding Photographer Says:

    Cool thanks – I love to use the fortune cookies in my signatures, so I’ll give this a whirl!

Leave a Reply