September 6, 2011

Bible verses in Mint fortunes

For my most recent computer, I've installed Linux Mint 11. In Mint, bash is set to display a fortune cookie every time you start a shell session.


This is a nice idea, however I would rather see daily Bible verses than random fortunes. Here is how to do that. First, install the verse package:


$ sudo apt-get install verse


Then, edit /usr/bin/mint-fortune with sudo, and replace the line:


/usr/games/fortune | $command -f $cow


with


/usr/bin/verse | sed -e 's@^ *@@' | $command -f $cow


To be sure that the file won't be overridden when you upgrade your distribution, set it as a local diversion:


$ sudo dpkg-divert --local /usr/bin/mint-fortune


and you're done!

3 comments:

blindvic said...

Thanks! Nice!

brianp said...

I was just now trying to figure out how to make custom fortunes so that I could make a set of verses . . and here it is basically already done! Thank you!

jimdaniel said...

You can get useful information on the bible at http://www.VirtualHolyBible.com