Custom MOTD for the Raspberry Pi

motd

With so many uses for a Raspberry Pi in a headless configuration – especially with the impending release of the Raspi Model A – we’re surprised it has taken so long for someone to send in a way to create a custom message of the day that is displayed whenever you SSH into everyone’s favorite Linux board.

A MOTD is used by servers to display messages to new users, or simply system information for server admins. It’s a simple text file stored in /etc/motd, but with some proper beardly Unix wizardry it’s possible to display uptime, free memory, and even the weather wherever the Raspi is located.

[yanewby] over on the Raspberry Pi forums created a nice little MOTD that grabs weather data from the Internet and displays it alongside an ASCII rendering of the Raspberry Pi logo. Of course like everything in Unix, this MOTD can be modified to do just about anything, from checking your Twitter to sending a text message to your phone.

31 thoughts on “Custom MOTD for the Raspberry Pi

    1. I also like how the image has the local IP obfuscated (as someone mentioned in the comments). Watch out, I might try to login to 192.168.1.1 over the internet. :rolleyes:

    2. Same feelings here. The comment section can be full of unwarranted negativity but the criticism today is far from groundless.
      This isn’t a hack, it’s a bad tutorial for a menial script that tries to emulate motd/ssh banner.

  1. Off topic to the NAHs (Not A Hack):

    I think the ASCII version of the Raspi logo looks like Micky Mouse.

    Mouse of the Day?

    Will tomorrow be Mighty Mouse?

  2. All time low HaD!

    This is not only NOT A HACK, but it’s done THE WRONG WAY!
    this guy puts the script in ~/,bash_profile instead of /etc/motd, EPIC FAIL!

  3. Hate to add my first Notahack in the years I’ve been reading this but.., This is stuff we mastered when I started learning Unix (System V, yeah!) when I was 16. That back-quote is some clever stuff! But yeah, using shell-scripts and the STANDARD SYSTEM FUNCTION that is motd… If it’s in the manual (ha! ha!) then it’s not a hack!

  4. I think I’ll submit a tutorial on using cowsay instead of motd, that will blow everyone’s minds!! I’ll even obfuscate my uptime so no one can hax0r me!

    Better yet, I think I’ll file my RPi down to a razor edge and throw it at the moron who greenlighted this “hack”. At least that takes some skill and effort.

  5. It would be handy if Hack-a-Day would add some sort of Not-a-Hack voting feature, which would force them to reconsider the particular “hack” when clicked enough times. Echoing the other commenters, The ASCII-art raspberry is nice, but hardly HaD-worthy, and the rest of the hack is done poorly and far from original.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s