Display a Tux the launch of the terminal

February 2017




Prerequisites


From your manager software install the following programs and their dependencies:

- Cowsay

- Figlet

Cowsay

  • Cowsay is a software that displays a cow that says what you want it to say.
  • For more information, read the man page of cowsay.


initials@alexis:~$ cowsay Hello! 
 ________ 
< Hello! > 
 -------- 
        \   ^__^ 
         \  (oo)\_______ 
            (__)\       )\/\ 
                ||----w | 
                ||     ||
  • Via the-f option of Cowsay, you can see different animals.


initials@alexis:~$ cowsay -f  
apt                elephant           meow               supermilker 
beavis.zen         elephant-in-snake  milk               surgery 
bong               eyes               moofasa            suse 
bud-frogs          flaming-sheep      moose              telebears 
bunny              ghostbusters       mutilated          three-eyes 
calvin             gnu                ren                turkey 
cheese             head-in            satanic            turtle 
cock               hellokitty         sheep              tux 
cower              kiss               skeleton           udder 
daemon             kitty              small              vader 
default            koala              sodomized          vader-koala 
dragon             kosh               sodomized-sheep    www 
dragon-and-cow     luke-koala         stegosaurus         
duck               mech-and-cow       stimpy             
  • Example by choosing "koala" in the list of possibilities, you get the following result:



initials@alexis:~$ cowsay -f koala Hello! 
 ________ 
< Hello! > 
 -------- 
  \ 
   \ 
       ___   
     {~._.~} 
      ( Y ) 
     ()~*~()    
     (_)-(_)   
  • All these options are located in /usr/share/cowsay/cows/.

Figlet


Figlet will diplays a text previously entered in large letters.

For more information, read the man page of Figlet.

initials@alexis:~$ figlet Hello! 
 _   _      _ _       _  
| | | | ___| | | ___ | | 
| |_| |/ _ \ | |/ _ \| | 
|  _  |  __/ | | (_) |_| 
|_| |_|\___|_|_|\___/(_)

A combination of both software

  • You can combine the use of these two programs into a single line as follows:


initials@alexis:~$ cowsay -f tux Hello! && figlet The world 
 ________ 
< Hello! > 
 -------- 
   \ 
    \ 
        .--. 
       |o_o | 
       |:_/ | 
      //   \ \ 
     (|     | ) 
    /'\_   _/'\ 
    \___)=(___/ 

 _____ _                               _     _  
|_   _| |__   ___  __      _____  _ __| | __| | 
  | | | '_ \ / _ \ \ \ /\ / / _ \| '__| |/ _' | 
  | | | | | |  __/  \ V  V / (_) | |  | | (_| | 
  |_| |_| |_|\___|   \_/\_/ \___/|_|  |_|\__,_| 
  • But that's not all, the software can also display the result of a command.


initials@alexis:~$ cowsay -f tux $(whoami) 
 __________ 
< initials > 
 ---------- 
   \ 
    \ 
        .--. 
       |o_o | 
       |:_/ | 
      //   \ \ 
     (|     | ) 
    /'\_   _/'\ 
    \___)=(___/
  • You can get this kind of result:



initials@alexis:~$ cowsay -f tux $(uname -r) && figlet $(whoami) 
 ________ 
< 2.6.37 > 
 -------- 
   \ 
    \ 
        .--. 
       |o_o | 
       |:_/ | 
      //   \ \ 
     (|     | ) 
    /'\_   _/'\ 
    \___)=(___/ 

 _       _ _   _       _      
(_)_ __ (_) |_(_) __ _| |___  
| | '_ \| | __| |/ _' | / __| 
| | | | | | |_| | (_| | \__ \ 
|_|_| |_|_|\__|_|\__,_|_|___/
  • You simply have to edit the text file (.Bashrc) located in your home directory.
  • Add your custom command created, at the end:
  • clear && cowsay -f tux $(uname -r) && figlet $(cat /etc/debian_version)
  • Save and close.
  • The next time you open a terminal, you should get something like that:

< 2.6.37 > 
 -------- 
   \ 
    \ 
        .--. 
       |o_o | 
       |:_/ | 
      //   \ \ 
     (|     | ) 
    /'\_   _/'\ 
    \___)=(___/ 

                                      __   _     _  
 ___  __ _ _   _  ___  ___ _______   / /__(_) __| | 
/ __|/ _' | | | |/ _ \/ _ \_  / _ \ / / __| |/ _' | 
\__ \ (_| | |_| |  __/  __// /  __// /\__ \ | (_| | 
|___/\__, |\__,_|\___|\___/___\___/_/ |___/_|\__,_|

Related


Published by deri58. Latest update on March 4, 2011 at 09:54 AM by deri58.
This document, titled "Display a Tux the launch of the terminal," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).