How to make your own fortune files

Submitted by ormiret on Mon, 12/02/2007 - 01:01.

To make fortune files:

  1. Make a text file with your entries separated by %s:


    First entry
    %
    Second entry

  2. Run the command strfile -r $name_of_text_file $name_of_text_file.dat
  3. Put the text file and the .dat created in the last step into /usr/share/games/fortunes/
  4. Make a symbolic link to the text file in /usr/share/games/fortunes/ named $name_of_text_file.u8
  5. You can now run fortune $name_of_text_file to get a random entry from the file.
( categories: )