Druplicon MOTD

At DrupalCon Chicago 2011, Dmitri Gaskin had a presentation titled, "From Zero to Distribution using Features, Profiler, and Drush Make." If you don't already know how to make your own Drupal distribution, he summed up the entire process expertly, however there was one detail in his presentation I've never seen before; it was an ASCII Druplicon when he opened his terminal.

Linux users call that the message of the day, or MOTD. On MacOS, that file is located at /etc/motd, but isn't created in a default installation. If you'd like a Druplicon MOTD, I reproduced what Dmitri had in the video on archive.org. There are versions for white (like Dmitri) and black (like mine) terminal backgrounds.

I know I could hide the last login by touching ~/.hushlogin, but that would also hide the motd output, so if someone would like to leave a comment on how to print the motd, but not the last login, that's the last piece to rounding out this copycat job. Otherwise, the solution is to add extra newlines at the bottom of the motd to cause the last login information to scroll off the screen.

AttachmentSize
ASCII art Druplicon for white backgrounds1.41 KB
ASCII art Druplicon for black backgrounds1.41 KB


» deekayen's blog · Printer-friendly version Topics:

To get the last login to

To get the last login to disappear, add three, blank newlines to the bottom of the motd file.

reply

I don't care for the

I don't care for the druplicon but thanks for the tip on ~/.hushlogin. I needed that.

-moshe

reply

hiding last login

on linux, you can hide the last login by commenting out pam_lastlog.so in /etc/pam.d/login.

change a line that looks like this:

session optional pam_lastlog.so

to:

#session optional pam_lastlog.so

reply

Not on MacOS

The only optional session item in the MacOS login file is

session optional pam_mount.so

reply

;-)

;-)

reply

Post new comment

  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <hr /> <a> <p> <em> <strong> <cite> <code> <blockquote> <ul> <ol> <li> <dl> <dt> <dd>
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.