I saw that Mint 13 and LMDE (as well as the Debians don't show fortunes automatically by default). Who wants to stare at a boring old terminal screen?
Have some fun with fortunes! Have some more fun with cowsay and the numerous creatures available! Have one or have em all!
It's really easy too; all you need to do is edit your .bashrc in your home folder (it's hidden, press Ctrl+H to see hidden files and folders) and add one line of code to it.
If you don't know what fortune is, it's basically a program that shows random quotes, fortunes, and sayings--many from famous authors, many from well respected Linux users (like Husse for example), and some from anonymous users. If you don't already have fortune installed, the command to install it is:
Code: Select all
sudo apt-get install fortune-mod
Code: Select all
sudo apt-get install cowsay
Option 1: Automatic fortunes + cowsay
This option will automatically display a fortune ALONG with a random cowsay creature whenever you open a terminal.
First: Open a terminal
Second: Paste this in the terminal. Hit enter and you're done. Close the terminal, reopen it and voila! (Read the explanation if you want to know how the command works).
Code: Select all
echo 'cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) $(fortune)' | tee -a /home/$USER/.bashrc
Now, here is the explanation. The "cowsay -f" option allows a person to choose a creature to say the thought (in this case I made it random);
the "ls /usr/share/cowsay/cows/" lists all the .cow files (which contain the creatures) and the list is handed over to "shuf" which obviously shuffles or randomizes them;
the "fortune" bit is the actual fortune that is outputted via the random animal; the "tee -a" takes the output of what "echo" echoed and adds it at the end of a file (over here, that is .bashrc). You COULD use gedit (pluma) or leafpad to edit the .bashrc file, but I'm to lazy to do that
Option 2: Automatic fortunes ONLY
Paste the following line in a terminal and press enter. Close the terminal, reopen it again, and ta-daaa! (Not much to explain here. Read the explanation above).
Code: Select all
echo 'fortune' |tee -a /home/$USER/.bashrc
This is a good idea if you're not bored all the time, but when you are bored, you can call the cows and other creatures on demand to entertain you.
Paste the following line in a terminal and press enter. Close the terminal, reopen it. (Note: for the alias, the command should NOT be "fortune" as it is already used).
Code: Select all
echo alias fortunes=\''cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) $(fortune)'\' | tee -a /home/$USER/.bashrc
Explanation. The "alias" acts like a placeholder so when you issue your custom command, it will execute whatever you set that alias to.
Now whenever you want to call on the animals and fortunes, type in "fortunes" in the terminal and press enter! That's it!
Wikipedia can explain more: http://en.wikipedia.org/wiki/Alias_%28command%29
Thanks for looking at my tutorial! I hope you've enjoyed it as much as the funny quotes and awesome animals!
That concludes my tutorial. If you have any suggestions, or if any of the commands fail to work, do let me know here...I don't appreciate messages unless its crazy important.
If for some reason you want to remove these commands, you can easily edit the .bashrc file in your home folder using Gedit (Pluma), Geany, Nano, or Leafpad and remove the parts that you don't require. Here's a screenshot of some of the more "interesting" creatures (and things) that I liked:
Tags (ignore this. It's here so the Google bots can find this how-to easily): fortunes-mod, fortunes, cowsay, automatic fortunes, auto fortunes, automatic cowsay, auto cowsay, cowsay and fortune, cowsay with fortune, random cowsay, random fortunes and cowsay.