Skip to content

Instantly share code, notes, and snippets.

@piksel
Created June 30, 2012 12:15
Show Gist options
  • Star 33 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save piksel/3023588 to your computer and use it in GitHub Desktop.
Save piksel/3023588 to your computer and use it in GitHub Desktop.
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)
( : '~' : )
'~ .~~~. ~'
'~'
$(tput sgr0)"
if [ `whoami` != "root" ]; then
echo "$logo"
echo "Run as root to update your motd."
else
echo "$logo" > /etc/motd.tail
/etc/init.d/bootlogs
echo "Updated MOTD. Log in to see the new logo."
fi
@Jamesking56
Copy link

This isn't working for me in raspbian.

@xvilo
Copy link

xvilo commented Dec 31, 2014

For people who want this to work on raspbian, change echo "$logo" > /etc/motd.tail (line 20) to echo "$logo" > /etc/motd

@chadyred
Copy link

Thank you xvillo !

@bifocalpirate
Copy link

There is a utility called toilet available via apt which lets you create coloured banners. The trick is to get toilet to export its output to ansi (much like how in this example the output of tput is). toilet -f big "text in font" --filter gay --export ansi > motdfile

@Fire7ly
Copy link

Fire7ly commented Mar 28, 2022

There is a utility called toilet available via apt which lets you create coloured banners. The trick is to get toilet to export its output to ansi (much like how in this example the output of tput is). toilet -f big "text in font" --filter gay --export ansi > motdfile

lolcat is nice approach I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment