Custom MOTD for the Raspberry Pi


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.


  1. Alex Rossie says:

    Jesus, all time low.

  2. Alex Rossie says:

    Just read the link and my god, I thought the guy was at least using update-motd!

    The top link will explain how to properly implement dynamic MOTDs on debian.

  3. Aaron says:

    must be a hack, because it runs on an rpi! true! u cant do normal things on this crazy hackable device!!!!

  4. fartface says:

    Newbie level stuff, Unix guys have been doing this for decades.

  5. svofski says:

    This made me remember this:

    Next up: a series of articles about changing desktop backgrounds.

  6. Didn’t realize hackaday was moving into Linux For Dummies territory. Tomorrows RPi hack: how to colorize your directory listings as default.

  7. Johny007 says:

    BTW the script cannot show temperatures below zero…

  8. dext0rb says:

    OK, I don’t usually cry too much about “not a hack!”, but changing the MOTD banner? Really?

  9. jc says:

    Good freaking god. I think this is too much right there.

  10. leachim6 says:

    I love how people blur out their local IP address so they don’t get “hackerrrred”

  11. Phrewfuf says:

    I see how this guy knows about Networks, hiding his private IP-Address like a madman :D

  12. CG says:

    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?

  13. Skinlee says:

    Nothing new, XBian uses the same trick to launch a custom setting menu when logging into ssh

  14. Seth says:

    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!

  15. Greenaum says:

    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!

  16. MS3FGX says:

    Definitely one of the worst things HaD has ever run.

  17. Z says:

    Wouldn’t have thought many people will be ssh’ing into the model A?

  18. kaidenshi says:

    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.

  19. Christophe says:

    Is HaD sponsored by the RPi foundation? Seriously, less useless RPi posts like this one, please.

  20. dRbiG says:

    This is indeed low. Pavement-level low :(

  21. 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: Logo

You are commenting using your 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


Get every new post delivered to your Inbox.

Join 96,711 other followers