MartinLenord
Posts: 5
Joined: Sat May 05, 2012 10:21 am

Re: Raspberry Pi ASCII Art

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

Martin

User avatar
stevepdp
Posts: 285
Joined: Fri Oct 28, 2011 7:41 am

Re: Raspberry Pi ASCII Art

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.

b3n
Posts: 1
Joined: Tue May 15, 2012 11:49 pm
Contact: Website

Re: Raspberry Pi ASCII Art

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)"

User avatar
jezmck
Posts: 24
Joined: Sat Sep 10, 2011 4:34 pm
Contact: Website

Re: Raspberry Pi ASCII Art

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?

ToyleY
Posts: 3
Joined: Sun Apr 15, 2012 1:37 pm

Re: Raspberry Pi ASCII Art

Tue May 29, 2012 10:56 pm

Raspi (88)

User avatar
jezmck
Posts: 24
Joined: Sat Sep 10, 2011 4:34 pm
Contact: Website

Re: Raspberry Pi ASCII Art

Wed May 30, 2012 7:09 am

Nvm, it works after a reboot.

User avatar
Super-Nathan
Posts: 67
Joined: Sun Jun 17, 2012 6:56 am
Location: South Korea
Contact: Website

Re: Raspberry Pi ASCII Art

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
extravagoose
Posts: 59
Joined: Tue May 29, 2012 2:51 pm
Location: UK
Contact: Website

Re: Raspberry Pi ASCII Art

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
piksel
Posts: 2
Joined: Sat Jun 30, 2012 12:16 pm
Location: skärhamn, sweden
Contact: Website

Re: Raspberry Pi ASCII Art

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.

Igneosaur
Posts: 3
Joined: Fri Aug 10, 2012 1:27 pm

Re: Raspberry Pi ASCII Art

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.

Naps62
Posts: 3
Joined: Sat Aug 18, 2012 3:09 am

Re: Raspberry Pi ASCII Art

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

rilski
Posts: 12
Joined: Wed Aug 15, 2012 9:33 am

Re: Raspberry Pi ASCII Art

Sun Aug 19, 2012 5:16 am

Looks good!

Should be a included into something like an SSH/FTP or Telnet welcome message! lol :)

voltagex
Posts: 4
Joined: Thu Dec 20, 2012 9:59 pm

Re: Raspberry Pi ASCII Art

Thu Dec 20, 2012 10:01 pm

update-motd anyone? Anyone?

http://man.he.net/man5/update-motd

ichi1984
Posts: 1
Joined: Wed Jan 09, 2013 7:12 am

Re: Raspberry Pi ASCII Art

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 :/

askschwa
Posts: 1
Joined: Thu Sep 27, 2012 12:54 am

Re: Raspberry Pi ASCII Art

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.

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

Re: Raspberry Pi ASCII Art

Sat Feb 09, 2013 6:16 pm

Looks great. Thanks guys!
Attachments
login.png
login.png (8.01 KiB) Viewed 34190 times

minkowski
Posts: 52
Joined: Tue Jan 29, 2013 12:10 pm

Re: Raspberry Pi ASCII Art

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!

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

Re: Raspberry Pi ASCII Art

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

minkowski
Posts: 52
Joined: Tue Jan 29, 2013 12:10 pm

Re: Raspberry Pi ASCII Art

Mon Feb 11, 2013 9:26 pm

thanks!

borsitsb
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am

Re: Raspberry Pi ASCII Art

Fri Mar 15, 2013 11:58 am

@tgwaste: How can I run your shell script as message of the day in SSH?

Fol
Posts: 2
Joined: Wed Mar 13, 2013 7:20 pm

Re: Raspberry Pi ASCII Art

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 ?

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

Re: Raspberry Pi ASCII Art

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.

borsitsb
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am

Re: Raspberry Pi ASCII Art

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?

Fol
Posts: 2
Joined: Wed Mar 13, 2013 7:20 pm

Re: Raspberry Pi ASCII Art

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.

borsitsb
Posts: 5
Joined: Fri Mar 15, 2013 11:52 am

Re: Raspberry Pi ASCII Art

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.

Return to “General discussion”