brandocorp
Posts: 1
Joined: Sun Jun 02, 2013 9:12 pm

Re: Raspberry Pi ASCII Art

Sun Jun 02, 2013 9:20 pm

I didn't want the fancy verion with all the extra info. Just the nifty ascii art. I got this working on my pi by doing the following:

Code: Select all

vi update-motd.sh
Then pasted in the following:

Code: Select all

#!/bin/bash
ip=`ip addr show scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1`
echo -e "\033[0;32m
    .~~.   .~~.
   '. \ ' ' / .'\033[0;31m
    .~ .~~~..~.
   : .~.'~'.~. :
  ~ (   ) (   ) ~
 ( : '~'.~.'~' : )\033[0;37m Raspberry Pi \033[0;31m
  ~ .~ (   ) ~. ~ \033[0;37m $ip \033[0;31m
   (  : '~' :  )
    '~ .~~~. ~'
        '~'\033[0;30m
"
You can test it by running the script

Code: Select all

chmod +x update-motd.sh && ./update-motd.sh
Then I ran this to place the message into /etc/motd

Code: Select all

sudo su -c "/home/pi/update-motd.sh > /etc/motd" - root

User avatar
solar3000
Posts: 1011
Joined: Sat May 18, 2013 12:14 am

Re: Raspberry Pi ASCII Art

Mon Jun 03, 2013 3:34 pm

Ahhhh ANSI art.
I remember the good old ASCII porn days.
Antikythera

Pegasus82
Posts: 2
Joined: Thu Jun 20, 2013 9:25 am

Re: Raspberry Pi ASCII Art

Thu Jun 20, 2013 9:27 am

There is one problem with this, the IP address is not updated in the motd each reboot. It is only updated by the update-motd.sh which you created.

So, how to run this update-motd.sh (or otherwise update the motd) at boot before the motd is actually displayed (ie: in order to get the current IP address)?

tgwaste
Posts: 41
Joined: Thu Jan 31, 2013 7:15 pm

Re: Raspberry Pi ASCII Art

Thu Jun 20, 2013 5:22 pm

why rely on the motd for the current IP addres?

hostname -I

totoharibo
Posts: 3925
Joined: Thu Jan 24, 2013 8:43 am

Re: Raspberry Pi ASCII Art

Thu Jun 20, 2013 6:42 pm

to make a text in ASCII art use package figlet

Pegasus82
Posts: 2
Joined: Thu Jun 20, 2013 9:25 am

Re: Raspberry Pi ASCII Art

Thu Jun 20, 2013 7:22 pm

tgwaste wrote:why rely on the motd for the current IP addres?

hostname -I
I'm not relying on the motd.

The boot output already lists the IP address without even needing "hostname -l"

I just wanted to know how to make the motd more dynamic in this way.

rgm3
Posts: 1
Joined: Sun May 22, 2016 6:11 am

Re: Raspberry Pi ASCII Art

Sun May 22, 2016 6:27 am

Here's my version of the Raspberry Pi logo in "ASCII" art, using some unicode characters:
Image

Code: Select all

#!/bin/bash

echo -en " \033[1;32m"
echo -e "⋱⋱ ⋰⋰"
echo -en "\033[1;31m"
echo -e " ◖ ● ◗"
echo -e "◖ ● ● ◗"
echo -e " ◖ ● ◗"
echo -e "   •"
echo -en "\033[0m"

grininmonkey
Posts: 62
Joined: Mon Jul 30, 2018 3:44 pm

Re: Raspberry Pi ASCII Art

Wed Sep 19, 2018 9:26 pm

I found this old thread today... and it gave me an idea..... each time I connect to my PI's, my retropies have the nice welcome via the .bashrc.... my project/functional PI's look boring when I shh to them... so I copied the retropie_welcome function in the .bashrc file and replaced the joystick with the ascii raspberry from this thread.

I decided to place it in its own file and added it to /bin so that I can call it anytime like I do with "screenfetch" in my normal linux system... so I named it "pifetch".... in this case, however... its actually more useful than screenfetch because it displays temp, mem etc ;-)

Image

I posted the script to gist:
https://gist.github.com/grininmonkey/a4 ... 85aa18a3a7

bertlea
Posts: 169
Joined: Wed Dec 07, 2016 6:33 am
Location: Hong Kong

Re: Raspberry Pi ASCII Art

Thu Sep 20, 2018 6:33 am

Is it really true that we can get the temperature of CPU and GPU separately? This is not the first time I see that people refer the value from:

Code: Select all

/sys/class/thermal/thermal_zone0/temp
as the CPU temperature and refer the value returned from

Code: Select all

vcgencmd measure_temp
as GPU temperature. I thought they both are the same that reflecting the temperature of the whole SoC. Can anyone confirm?

grininmonkey
Posts: 62
Joined: Mon Jul 30, 2018 3:44 pm

Re: Raspberry Pi ASCII Art

Fri Sep 21, 2018 6:49 pm

I believe your right.... I have always noticed the same value from both.

Return to “General discussion”

Who is online

Users browsing this forum: Steve Drain and 45 guests