Bible Quote of the Day

 · shakiestnerd
Table of contents

Linux Mint has the ability to add little applications to the desktop called "desklets". The applications are things like a disk space monitor, a fancy clock, a weather app, show your Google calendar, a digital photo frame and so on. Pretty nifty. It's a fun thing to play around with and see if there are any things you like.

Quote of the Day Desklet

I was playing around with the desklets the other day and saw one called "Quote of the day" desklet by JessW. Sounded cool, I downloaded and installed it. Added to my desktop and ... nothing. So, I went to the Cinnamon Spices: Quote of the day desklet web page to see if there was an easy fix.

It turns out, that the app uses a fun little linux command line application called fortunes as a backend tool and data repository for it's display. So, easy enough to install.

sudo apt install fortunes

That did the trick. Now there's a quote of the day on screen, plus a command line fortunes program that can be used to amuse myself or can be called from a script to add a little bit of randomness.

It's also fun to pipe the output through 'cowsay' which I already had installed.

fortune | cowsay

cowsay

| There a other cowsay characters available besides the cow. cowsay -l to get the list. Plus, the man page tells how to make your own "cows".

When you configure the desklet you can select the file that you want to draw the quotations from. This allows you to select any of the fortune data files that are installed on your system. There is a list included below of all the fortune data files that were installed in Linux Mint.

Transparent Background Tweak

Back to Quote of the Day

The quote of the day had a solid background color. Let's have a transparent background instead, letting the desktop wallpaper show through. This setting can be configured in the general desklet configuration on the Linux Mint System Settings tool.

System Settings

Open the system setting and go to the desklets. Note that on this screen, you can also get into the configuration for the quote of the day desklet.

Desklet Settings

After clicking on the General Settings button at the top of the dialog, you will finally see the general desklet configuration. On this screen, just set the decoration of desklets to "No decoration".

Desklet Configuration

Finally, a transparent background for the daily quote.

Bible Quotes

I really wanted inspirational biblical quotes to be displayed on the quote of the day screen. Examining the desklet web page and looking at the usr/share/games/fortunes folder gives the clues to put together a file of over 100 scriptures. I named the file 'bible' (real creative). From there, I ran the linux strfile bible bible.dat command to create a random access file for storing the text that the fortune application needed.

Bible Quotes

Once I got the file created and the quote of the day configured to display the verse, I also copied the files back into the usr/share/games/fortunes folder which means I can now also use the fortunes CLI tool to display a bible verse with the following command:

fortune bible

I also noticed that the fortune data files had three files. For example, there was a startrek, startrek.dat, and a startrek.u8 files. The .u8 files are just symbolic links. Although my bible files worked fine, for completeness I created the link with the command:

sudo ln -s bible bible.u8

Available Files

Don't feel like turning this into a github repository right now. It seems too minor for that. I am including a download link of the Bible Files here.

References

Fortune Files List

art
ascii-art
bible (added by me)
computers
cookie
debian
definitions
disclaimer
drugs
education
ethnic
food
fortunes
goedel
humorists
kids
knghtbrd
law
linux
linuxcookie
literature
love
magic
medicine
men-women
miscellaneous
news
paradoxum
people
perl
pets
platitudes
politics
pratchett
riddles
science
songs-poems
sports
startrek
tao
translate-me
wisdom
work
zippy