Now you know what they use in Linux Mint to make a cow “talk” when the terminal starts :). I’m going to tell you how to do it in a much more awesome way. The programs they use are cowsay and fortune-mode. Cowsay can show any string, a text output of a command,program to appear as a dialog generated by an ascii art (including cow).

There are options to decide the appearance of the cow and its eyes. For example the switch -d will cause the cow to appear dead. But the most important hack can be done by -f which forces to use a files called cowsay files, so that we can get anything other than cow. Type

cowsay -l

to find the path of these files. Try each file with following syntax

cowsay -f <cowfile name, without extension> <string to display>

ex: cowsay -f tux $USER

The cowfiles can be edited to appear as we want. Only edit the stuff rounded by the circle. Do not edit anything else, and save by giving a different file name. Or we can simply download an ascii art from internet and replace the stuff in rounded area.

Linux mint uses an additional program called fortune-mod to get’s stuff. Other than the command cowsay, cowthink can be used to appear like the cow is thinking, not speaking.

Fortune-mod (The classic fortune cookie program)

Fortune-mod is so far the funniest FOSS program i have come across with. It generates a random text string of a joke, a saying by a great person, something useful etc… Can’t be saying it all just try it by yourself. I haven’t seen the same thing twice after using it for some time.

Sudo apt-get install fortune-mod (for debian based systems)

yum install fortune-mod (for rpm based systems)

to use type fortune in the command line.

This can piped to above cowsay easily

ex: fortune | cowsay

a fortune | cowsay piped output

for other options of fortune, refer man pages.

Making the cow talk

To make this show on terminal startup (or run any program) you can put the above command in your bashrc file.

gedit ~/.bashrc

and add above commands, as you wish in it. You can add figlet command too. Open a new terminal to see the change.

So, mine produced something like the first picture in this post by these commands

Purism announced today that it delayed its upcoming Librem 5 privacy and security-focused Linux smartphone for the third quarter of 2019. Initially planned to ship in early 2019, the revolutionary Librem 5 mobile phone was delayed for April 2019, but now it suffered just one more delay due to the CPU choices the development team had to make to deliver a stab […]

The GNOME Project released today the second beta version of the forthcoming GNOME 3.32 desktop environment for public testing. The GNOME 3.32 beta 2 release is here two weeks after the first beta version to add even more improvements and squash as many bugs as possible before the final release hits the streets next month. The second beta release of the GNOME […]