As a Christian, I'm always used to install verse Linux tool on every server or private Desktop hostname I use. verse is very good and on run prints random quote from a short list of Bible quotes. Some time ago I blogged on that topic see how to make Debian / Ubuntu Linux to print bible daily quote on shell login. The problem with verse bible quotes is it becomes quickly boring and repeating again and again the same scripture quote, cause its data file is tiny – only 88Kb, 1383 lines of text:
hipo@pcfreak:~$ du -hsc /usr/share/verse/daily.verse
88K /usr/share/verse/daily.verse
88K total
hipo@pcfreak:~$ wc -l /usr/share/verse/daily.verse
1383 /usr/share/verse/daily.verse
Thus recently I thought on how I can use something to print me a bible quotes from whole Holy Scripture. On FreeBSD There is already existent King James Version, fortunes mod – text file db so I directly used it from here.
My idea was to set up fortune with above bibles forunes mod to print out a bible verse on Linux shell login. Here is how I did it:
1. First install fortune binary
For those who don't know Fortune it is a tiny program that uses a .txt database file and displays random epigram from a pre-selected fortunes file in those case it will be fortunes format plain text file with King James Holy Bible;
root@pcfreak:~# apt-get install --yes fortune-mod
....
The main fortune program binary is located on Debian / Ubuntu and other deb derivatives distros in:
/usr/games/fortune
2. Install KJV fortunes mod text file
root@pcfreak:~# cd /usr/local
root@pcfreak:/usr/local# mkdir fortune
root@pcfreak:/usr/local# cd fortune
root@pcfreak:/usr/local/fortune# wget -q https://www.pc-freak.net/files/bible-fortunes-mod-file.tar.bz2
root@pcfreak:/usr/local/fortune# tar -jxf bible-fortunes-mod-file.tar.gz
Just in case something happens with sourceforge's bible fortune db file a mirrored version of fortunes mod_bible is here.
Now as both fortune binary and bible database file is installed to print a random quote:
hipo@pcfreak:~$ /usr/games/fortune /usr/local/fortune/bible
Jerusalem remembered in the days of her affliction and of her miseries all her pleasant things that she had in the days of old, when her people fell into the hand of the enemy, and none did help her: the adversaries saw her, and did mock at her sabbaths. -- Lamentations 1:7
3. Set fortune to print on shell login
To make now Holy Bible verse appear on each user login I had to add to /etc/profile:
/usr/games/fortune -s /usr/local/fortune/
hipo@noah:~/Desktop$ ssh -l hipo www.pc-freak.net hipo@pcfreak's password: Linux pcfreak 2.6.32-5-amd64 #1 SMP Sun Sep 23 11:00:33 UTC 2012 x86_64
Welc0m3 t0 pC-fREAK … Enj0y.
Truly the light is sweet, and a pleasant thing it is for the eyes to behold the sun: — Ecclesiastes 11:7