sudo apt-get install fortunes fortune-mod xosd-bin
Then save the attached bash script file. Review the code to see I'm not doing anything nasty to you (I'm not, promise) and make the file executable by chmod +x /path/to/file. Then make a launcher icon by alt+right clicking on panel (in 5.5) or alt+meta+right clicking on panel (in 6.0) and select add -> custom launcher and point it to the script file you made executable. Add the cookie icon.
Now, to operate this fabulous tool, clicking on the icon will produce an adage. To make it disappear slowly double click the icon. The speed will depend on the speed of your computer and you can change the timing by modifying the sleep statements in the code. I wrote it like that because I only wanted 1 button to work the whole thing and didn't want to have to click twice to see a new fortune (i.e. simple on/off toggle).
You might like a different color or font or place it differently on screen. If you want to tweak it, suggest you read the osd_cat manual page. Some people might prefer the aosd-cat package to do the showing. It has entirely different syntax so it's not a drop in replacement but has fancier options like fadeouts and transparency.
The 64x64 indexed color icon is a derivative of this work by Lisa Williams http://www.flickr.com/photos/lisawilliams/2395943379/sizes/o/
The script probably is way too simple to get copyright but to make sure, I hereby place it into the public domain.
Yes, I obviously have too much spare time! Now, what did I miss or do in a particularly funny way?
<<attachment: preview.png>>
<<attachment: icon.png>>
# displays fortunes on X, in public domain #!/bin/sh #quick re-click closes, slow click shows new adage #check if the timing file exists if [ -e /tmp/killfortune ]; then #if it does, shutdown pkill -f "osd_cat -O2 -d0 -Acenter"&exit else #if the file doesn't exist, make it touch /tmp/killfortune #if this specific center osd_cat is running, kill it pgrep -f "osd_cat -O2 -d0 -Acenter">/dev/null&&pkill -f "osd_cat -O2 -d0 -Acenter" #store a fortune to a file fortune > /tmp/frtn #check it's not too many lines (<10) to display comfortably until [ `cat /tmp/frtn|wc -l` -lt 10 ];do fortune>/tmp/frtn done sleep 0.1 #display a fortune cat /tmp/frtn|osd_cat -O2 -d0 -Acenter -f"-*-bitstream charter-*-*-*-*-24-*-*-*-*-*-*-*" -cwhite -pmiddle -l10& #remove the timing file after a short while sleep 0.5 rm -f /tmp/killfortune fi
