Raspberry Pi ASCII Art


31 posts   Page 1 of 2   1, 2
by MartinLenord » Sat May 05, 2012 12:03 pm
Hi Folks,

I was lucky enough yesterday to receive my raspberry pi yesterday and set about setting it up and customising it a little.

Whilst doing that I decided to make some pretty ascii art for the login screen



It took some time to get the colours right, but I didn't think it was too bad for a first attempt

If you want to use it, you can download it here https://www.dropbox.com/s/7yrfpllwmx7ozfd/issue.txt

then just save it as /etc/issue to make it show up when logging in

If anyone else has made anything, I'd be interested to see what other people come up with :D

Martin
Posts: 5
Joined: Sat May 05, 2012 10:21 am
by stevepdp » Sat May 05, 2012 12:30 pm
This is pretty cool, thanks.

For anybody curious as to how the colour codes work, they've been fairly well documented here.
I'm not a part of the Raspberry Pi Foundation, I'm just a very enthusiastic fan.
Web developer, hobbyist game developer and co-organiser of several things.
User avatar
Moderator
Moderator
Posts: 284
Joined: Fri Oct 28, 2011 7:41 am
Location: Norfolk, UK
by b3n » Wed May 16, 2012 12:57 am
Came up with this

Image

Code: Select all
   .~~.   .~~.
  '. \ ' ' / .'
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) Raspberry Pi
   '~ .~~~. ~'
       '~'


Script to output in colour
Code: Select all
#!/bin/bash
echo "$(tput setaf 2)
   .~~.   .~~.
  '. \ ' ' / .'$(tput setaf 1)
   .~ .~~~..~.
  : .~.'~'.~. :
 ~ (   ) (   ) ~
( : '~'.~.'~' : )
 ~ .~ (   ) ~. ~
  (  : '~' :  ) $(tput sgr0)Raspberry Pi$(tput setaf 1)
   '~ .~~~. ~'
       '~'
$(tput sgr0)"
Posts: 1
Joined: Tue May 15, 2012 11:49 pm
by jezmck » Tue May 29, 2012 10:48 pm
The message isn't showing up for me.

Using debian.

On other machines I've edited /etc/motd.tail so I tried that here, but to no avail.

Any ideas?
User avatar
Posts: 22
Joined: Sat Sep 10, 2011 4:34 pm
by ToyleY » Tue May 29, 2012 10:56 pm
Raspi (88)
Posts: 3
Joined: Sun Apr 15, 2012 1:37 pm
by jezmck » Wed May 30, 2012 7:09 am
Nvm, it works after a reboot.
User avatar
Posts: 22
Joined: Sat Sep 10, 2011 4:34 pm
by Super-Nathan » Wed Jun 27, 2012 2:16 am
in debian:

/etc/motd.tail edits /var/run/motd on boot

/etc/motd is symlinked to /var/run/motd

/etc/motd is read by login and displayed
echo "Something Useful" > /dev/null
User avatar
Posts: 67
Joined: Sun Jun 17, 2012 6:56 am
Location: South Korea
by extravagoose » Wed Jun 27, 2012 7:40 am
b3n wrote:Came up with this

Image



I've been able to incorporate this alongside an Arch Linux | ARM ASCII too... I will of course say credit to the respective authors of each mind - I'm useless creatively speaking. :P But this is how it appears on my terminal:
Image

But If its any help to anyone, feel free to download the motd file from this page:
http://sjjones85.servebeer.com/files.html
RPi 1: Hostname: Gimli, 500Gb USB HDD, ArchLinux | ARM.
Main Use: Bit of everything - but mainly web server, Network Storage and C programming.

RPi 2: Hostname tba, awaiting delivery.
User avatar
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
by piksel » Sat Jun 30, 2012 12:19 pm
I made my own remix and an install script: https://gist.github.com/piksel/3023588
Image

Update: Fixed url. Dont know why it stopped working without prefixing...
Last edited by piksel on Wed Jun 26, 2013 5:07 pm, edited 1 time in total.
User avatar
Posts: 2
Joined: Sat Jun 30, 2012 12:16 pm
Location: skärhamn, sweden
by Igneosaur » Sat Aug 11, 2012 11:51 am
Sorry, I think I'm being stupid. I'm putting this directly into /etc/motd :

Code: Select all
$(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)


^Looks messed up here but you get the point...

But that's exactly what I'm getting straight out, no colours. I also tried putting it in quotes and after an 'echo' but still the same thing. It's not interpreting it, it's just being dumped out literally.
Posts: 3
Joined: Fri Aug 10, 2012 1:27 pm
by Naps62 » Sun Aug 19, 2012 4:07 am
@Igneosaur

you have to paste the gist code in a different file, and run it as a script (with sudo). it will update the motd file itself
Posts: 3
Joined: Sat Aug 18, 2012 3:09 am
by rilski » Sun Aug 19, 2012 5:16 am
Looks good!

Should be a included into something like an SSH/FTP or Telnet welcome message! lol :)
Posts: 12
Joined: Wed Aug 15, 2012 9:33 am
by voltagex » Thu Dec 20, 2012 10:01 pm
update-motd anyone? Anyone?

http://man.he.net/man5/update-motd
Posts: 2
Joined: Thu Dec 20, 2012 9:59 pm
by ichi1984 » Wed Jan 09, 2013 7:22 am
Hey guys, I've got my art all hammered out. When I run it in terminal as sudo sh /etc/issue it shows properly in terminal. Upon restart though, I see the regular grey text as with the color code mixed in. I'm a super noob to unix systems and this is as far as I could get myself :/
Posts: 1
Joined: Wed Jan 09, 2013 7:12 am
by askschwa » Sat Jan 19, 2013 7:26 pm
piksel wrote:I made my own remix and an install script: https://gist.github.com/gists/3023588
Image


I want to use your install script, but the link is not working anymore.
Posts: 1
Joined: Thu Sep 27, 2012 12:54 am
by tgwaste » Sat Feb 09, 2013 6:16 pm
Looks great. Thanks guys!
Attachments
login.png
login.png (8.01 KiB) Viewed 9254 times
Posts: 18
Joined: Thu Jan 31, 2013 7:15 pm
by minkowski » Mon Feb 11, 2013 3:40 pm
@tgwaste what's the code your using for the extra info? i like that mix of art and information.
thanks!
Posts: 52
Joined: Tue Jan 29, 2013 12:10 pm
by tgwaste » Mon Feb 11, 2013 7:24 pm
hello mink, here is a link to my welcome.sh which has everything you need.

http://dl.dropbox.com/u/61083309/www/content/welcome.sh
Posts: 18
Joined: Thu Jan 31, 2013 7:15 pm
by minkowski » Mon Feb 11, 2013 9:26 pm
thanks!
Posts: 52
Joined: Tue Jan 29, 2013 12:10 pm
by borsitsb » Fri Mar 15, 2013 11:58 am
@tgwaste: How can I run your shell script as message of the day in SSH?
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am
by Fol » Fri Mar 15, 2013 4:00 pm
@borsitsb : cron could do the job I think.
Code: Select all
crontab -e
Then just add a new command, it can look like that for example, if you want to update your welcome message every hour :
(maybe cron and crontab are not strictly the same thing, I'm not sure about that)
Code: Select all
* 1  * * * welcome.sh >> /etc/motd
When it is launched manually, all works well. However, done by cron, the text is there but all colors are missing... :?

Does someone has any idea about what is wrong ?
Posts: 2
Joined: Wed Mar 13, 2013 7:20 pm
by tgwaste » Fri Mar 15, 2013 6:59 pm
welcome.sh is a script. motd is not. welcome uses the command tput to set the colors but motd wont be able to do that, you will have to do colors probably like: ^[[1;XXm which is kind of a pain.
Posts: 18
Joined: Thu Jan 31, 2013 7:15 pm
by borsitsb » Fri Mar 15, 2013 10:11 pm
I renamed 'welcome.sh' to '01-welcome', then I moved it to '/etc/update-motd.d' folder and I waited for 10 minutes and nothing happened. What should I set?
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am
by Fol » Mon Mar 18, 2013 4:14 pm
@borsitsb : I can't really help you about this, I am not using update-motd. If I remember well, it is depreciated. I'm just using a cron job on the root account (a bit dirty maybe) and it does the trick.
-------------------------------------------------------------------------
I managed to update my /etc/motd with colors, using the awful color codes :
It is actually a mix between two codes given above.
Code: Select all
#!/bin/sh
ip=`ip addr show scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1`
up=`uptime | awk -F"up " '{print $2}' | awk -F"," '{print $1}'`
used=`df -h | grep 'dev/root' | awk '{print $3}'`
avail=`df -h | grep 'dev/root' | awk '{print $4}'`

echo "\033[0;32m
    .~~.   .~~.
   '. \ ' ' / .'\033[0;31m
    .~ .~~~..~.    \033[0;37m                   _                          _ \033[0;31m
   : .~.'~'.~. :   \033[0;37m   ___ ___ ___ ___| |_ ___ ___ ___ _ _    ___|_|\033[0;31m
  ~ (   ) (   ) ~  \033[0;37m  |  _| .'|_ -| . | . | -_|  _|  _| | |  | . | |\033[0;31m
 ( : '~'.~.'~' : ) \033[0;37m  |_| |__,|___|  _|___|___|_| |_| |_  |  |  _|_|\033[0;31m
  ~ .~ (   ) ~. ~  \033[0;37m              |_|                 |___|  |_|    \033[0;31m
   (  : '~' :  )
    '~ .~~~. ~'
        '~'

    \033[0;34m`hostname -f`
    \033[1;30m$ip
    \033[1;34mUsed | Free
    $used | $avail
    \033[1;30mUp. : $up
    \033[0;30m" > $1
And in crontab :
Code: Select all
0 1  * * * /path/to/updateMotd.sh /etc/motd
Edited crontab command, it was totally wrong...
Last edited by Fol on Tue Mar 19, 2013 11:00 pm, edited 3 times in total.
Posts: 2
Joined: Wed Mar 13, 2013 7:20 pm
by borsitsb » Mon Mar 18, 2013 10:00 pm
Thank you! It is working now :) . I'm beginner in Linux unfortunately, so I didn't know I should grant execute permission for that file either, but I managed it.
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am