Most of you might have noticed a cool feature which is available in Linux-Mint,
each time when you open a Terminal, it will display a cool - simple quote.
We don't have this option in Ubuntu. but we can have it.
First we have to install the Fortune Cookie Database in our system. we can do that by typing the following in a terminal.
sudo apt-get install fortune-mod cowsay
sudo apt-get install fortuneNow we have the database installed in our system. have a try by typing the following:
fortuneNow let us borrow a cool script from the Mint people.
open gedit (or any editor of your choice ) and type the following script in it and save it in /usr/bin/ by the name fortune.
#!/bin/bashRANGE=4number=$RANDOMlet "number %= $RANGE"case $number in0)cow="small";;1)cow="tux";;2)cow="koala";;3)cow="moose";;esac
RANGE=2number=$RANDOMlet "number %= $RANGE"case $number in0)command="/usr/games/cowsay";;1)command="/usr/games/cowthink";;esac
/usr/games/fortune | $command -f $cow
Now change the mode of this file to executable by typing the following in the terminal
sudo chmod +x /usr/bin/fortune
finally type the following in the terminal
sudo echo "/usr/bin/fortune" >> ~/.bashrc
Done !!! Now you will get a cool Fortune-Cookie , each time when you open the terminal...
Enjoy !! and Happy Hacking !!
Share this post :
