5

I see other people doing this, occasionally.

They'll add something like the following to the start of their terminal, sort of a welcome screen:

 ____  _____    _  _  _____  __  __    _    _    __    _  _  ____    ____  _____    ____  __      __   _  _      __       ___    __    __  __  ____  ___
(  _ \(  _  )  ( \/ )(  _  )(  )(  )  ( \/\/ )  /__\  ( \( )(_  _)  (_  _)(  _  )  (  _ \(  )    /__\ ( \/ )    /__\     / __)  /__\  (  \/  )( ___)(__ )
 )(_) ))(_)(    \  /  )(_)(  )(__)(    )    (  /(__)\  )  (   )(      )(   )(_)(    )___/ )(__  /(__)\ \  /    /(__)\   ( (_-. /(__)\  )    (  )__)  (_/
(____/(_____)   (__) (_____)(______)  (__/\__)(__)(__)(_)\_) (__)    (__) (_____)  (__)  (____)(__)(__)(__)   (__)(__)   \___/(__)(__)(_/\/\_)(____) (_)

It happens when the shell starts, and I would like to have it happen for me when the shell starts, too.

I am pretty proficient with vim for text editing, so I think I could figure out a way to do it.

If vim fails, I can use something like the following, but how do I make it come up not garbled when I start my new shell?

Please note that this question is not just about ASCII art, but is also about how to successfully add it to my bash, and about possible escapes required for the bash shell to get it to work properly.

Creating diagrams in ASCII

1
  • // , This is not a duplicate, as this is a question about how to both create ASCII art and add this to my shell, not only how to create ASCII art. Secondly, the question that @Thomas Dickey, etc. marked as the duplicate of this does NOT ask about the vagaries of getting that ASCII art to display properly in the terminal, which was the core of my question. I ask that moderators review this question. I have not accepted the answers below, yet, because they do not (yet) address the part of this question that makes it different. Jun 19, 2016 at 20:38

2 Answers 2

8

The tool most commonly used to do this is FIGlet, which is the backend used on sites such as the site suggested by user1794469. It is available as a package in most distributions and can be used either to render text dynamically from your scripts, or to generate text once which you then copy into your scripts.

To display a message every time you start a shell, you could add it to your shell’s startup scripts; for example, in .bashrc (for every single interactive Bash shell):

figlet -t -k -f /usr/share/figlet/small.flf "do you want to play a game?"

(compared to using static text, this has the advantage of adapting to the terminal size).

There are a number of other places you could put the text, depending on what you want exactly. Typical uses in the past involved /etc/issue and /etc/motd, but unless you access your system remotely, or from a virtual console, you’re unlikely to see those nowadays.

0
2

There are a number of sites that do this. This one is really good.

Once you have what you want it to say, just make sure your terminal uses a fixed width font and you should be set.

Not the answer you're looking for? Browse other questions tagged .