Friday, August 06, 2010

Display Dhammapada (Linux)

Another reason to switch to Linux, besides the fact that embraces Buddhist values of freedom and cooperation, is that it does all sorts of useful things, provided you are willing to exercise your cranium in order to figure them out. Here's one that's fairly easy to work with, called "display-dhammapada", a script used to display a verse from the Dhammapada at the command prompt.

display-dhammapada



If you'd rather have your words of wisdom from a cow (who wouldn't?), just pipe it through cowsay:

display-dhammapada | cowsay -W 120 -t



the "-t" option give a tired cow, but I think she's meditating...

Since it seems like a silly thing to have to open a command prompt every time you want your daily dose of wisdom, xcowsay is another useful program; pipe it through xcowsay and:

display-dhammapada | xcowsay



This last example can be added to your start-up scripts to be run when you log in. And for those of you who don't like cows, there's always zenity:

display-dhammapada | zenity --text-info --title="Dhammapada Verse" --width=600 --height=200



The script is available here:

http://unicode.strangled.net/me/rch/dd.html

or from the Ubuntu repositories:

sudo apt-get install display-dhammapada