LoginMSG

  • Last updated: January 7, 2014

About

I wrote LoginMSG to address a very simple convenience that I was without in my day-to-day life in Linux, namely, a simple way to leave myself a one-time message for the next time I logged in.

Keeping to-do lists is one thing, but quick "first thing tomorrow" reminders are another. After writing my fair share of such reminders, I got tired of going through post-it notes and decided to write a quick script that would allow me to automatically display myself a message the next time I logged in.

Thus LoginMSG was born. LoginMSG is a simple shell script (less than 50 lines long) that stores a text message and displays it. You can add a message, append to the existing message, remove the message, and view the existing message. When you view the message, a simple, no-frills xmessage box is displayed center-screen with your message, allowing you to read it and then remove it or keep it.

Download

Usage

LoginMSG v.1 - Display yourself a message (the next time X starts)

 usage: loginmsg [ options ]

 --add MSG : Create a message with contents MSG, or
             append MSG to the existing message contents.
             Message contents are stored in ~/.loginmsg.
 --show    : Display the message.
 --remove  : Remove any existing message.

Place the script somewhere in your $PATH. Add (or append) a message from a terminal using loginmsg --add. To display any existing messages when you login, have your desktop environment run loginmsg --show when you log in. LoginMSG does not have a feature to make itself automatically start when a user logs in -- you will have to see to that manually. There are many ways to do this. For example, in Gnome you could add it to the "Session" list in System -> Preferences -> Session. In Openbox, you could add it to ~/.config/openbox/autostart.sh. Reference the help pages for your specific desktop environment.