Message of the day

The other day someone mentioned the need for taking more advantage of the UNIX features in the desktop. Specifically, message of the day, talk/wall/finger were mentioned, in a need to take advantage of the multi user features we have. So, since I agree with what was said, I went through the addition of showing the message of the day (/etc/motd) at the beginning of the GNOME session.

Since it adds new strings and features, this can’t be added for 2.12, so I’m posting it here to get some comments (like if all distros use /etc/motd) and hopefully post it for inclusion after 2.12 is branched. The patch is here.

23 thoughts on “Message of the day”

  1. I really like the idea, but perhaps it would be better to implement it as a standalone command. This way you can run it anytime you want. And gnome-session can run it by default or something…

  2. Rodrigo, wouldn’t it be better to have the MOTD displayed in the splash screen so you can see something amusing / useful while Gnome is starting and it doesn’t get into your way later on. The current implementation requires pressing ok to get rid of the message dialog and I think I’d end up disabling this functionality.

  3. Of course, a problem is that now /etc/motd usually has some generic distro information instead of useful info the end-users. But if desktop environments start displaying it, maybe it will become used again.

    For example, /etc/motd on Debian:

    Linux nemein 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linux

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.

    I’m not sure I’d like to get that pushed into my screen every time I log in.

  4. I much prefer the idea of integrating this into GDM rather than a dialog a user has t oactually click. To be honest, I’d find the MOTD pretty annoying – the first thing I do in any Windows app with a similar idea is switch the damn things off!

    I would, however, be interested in seeing today’s fortune on my GDM screen…!

  5. I can see how network administrators would love this feature. Imagine a office where all users get notified about, say, that there are some problems with the fileserver at the moment and that the administrator is working hard on fixing it, or similar stuff.

  6. @Andreas Nilsson

    That’s a brilliant idea – but that sort of messaging should surely be handled by a dameon and libnotify?

    Netsend under nt displays an ok messagebox which can be very annoying. We use an in house solution to that sort of messaging for our xp machines that sits idling in the background and pops up pertinent information as and when it arrives in an xp info bubble. Perhaps an idea for a Gnome Love type project?

  7. That’s a nice thing for large installations to notify users about maintenance shutdowns / temporary absence of services.

    I like using /etc/motd for it. As somebody already mentioned gdm may be a good place for that too.

  8. GDM already has support for this via gdm.conf:

    # If InfoMsgFile points to a file, the greeter will display the contents of the
    # file in a modal dialog box before the user is allowed to log in.
    # If InfoMsgFile is present then InfoMsgFont can be used to specify the font
    # to be used when displaying the contents of the file.
    #InfoMsgFont=Sans 24

  9. @Wouter Bolsterlee

    The only down side of that is:

    “If InfoMsgFile points to a file, the greeter will display the contents of the file in a modal dialog box before the user is allowed to log in.”

    A bit invasive, and relies on people logging in to see the message. Shame really.

    I’m starting work on a MOTD/Notification spec that I’m hoping to start a project around…

  10. “/etc/motd is also shown AFTER you login on the console.”

    There is no way to notify a logged in user, using graphical apps, of any new notifications. Nor is there a way to manage historical messages received using motd…

    Would anyone value a spec/design written up for an enterprise desktop messaging solution? I have quite a few ideas I’d like some comments on

  11. I would get very annoyed if I kept seeing the same message every time I logged in.

    Idea: display /etc/motd only if its SHA1 hash changed since the last time it was shown.

  12. Jon – I was thinking about the same thing a few weeks ago. It would definitely be helpful to sysadmins to have something like this (for example with the ability to show messages from a queue at login, or push notifications to logged in users). In a multiuser LTSP environment like the one I run at work, it would be great. I’ve thought about just having our users get auto-logged in to our Jabber server when they sign on, and doing it that way, but I haven’t really played with it yet.

  13. Modifying GDM to allow for non-intrusive MOTD on the login screen seems like the most elegant solution to me. It could be up to the theme to handle this.

  14. “Idea: display /etc/motd only if its SHA1 hash changed since the last time it was shown.”

    Sounds very nice to me. I agree you don’t need to see the same message again and again.

    It’s also very important to be able to disable this feature.

    My two cents are it would rock to have this implemented as a notification rather than an intrusive pop-up dialog that needs to be clicked.

    If this dialogs makes it anyway I would be good to add a checkbox to “Show this message next time you login”.

    Of course, you need to have some intuitive UI to turn it on again if you turned it off.

    I also agree there should be a way (looks like a new program would do fine) to view the motd whenever the user wants, not just at session start-up. If this program existed, would it be nice to have so sort of historial to be able to review te messages of the past days? I’d say “yes” :)

  15. Hi, I would recommend making the following change to the your patch.


    + dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
    + “%s\n%s”,
    + _(“Message of the Day”), contents);


    + dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
    + _(“Message of the Day”));
    + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), contents);

  16. The /etc/issue should be shown before you login, and /etc/motd afterwards. /etc/motd can contain information that shouldn’t be available to anyone just walking past a computer (eg “All passwords must be changed by friday” — A Blackhat walking past can find out that everyone’s passwords will be changed and use that as part of a social engineering attack).

    At the university here they use a program like xmessage as part of the login scripts to show the MOTD. Perhaps showing the MOTD by default isn’t very useful (due to the crap distro’s put in it), but having it as an option to display “Never, Always, When-Modified” would be useful to people that administer larger networks. Alternatively just encouraging distros to not ship with inane motd’s, or provide an easy (And obvious) method for people to change the MOTD to something more useful.

    The motd they showed in the labs did require the user to dismiss it every time they logged in, which while irritating, wasn’t a big deal. It did contain information such as who to call for help if you were having technical issues etc and the Unix standard “/home is nearly full, please remove any unnecessary files”.

  17. A notification mechanism for wall/write would be wonderful, rather than having wall messages get spewed over each tty.

    Also, couldn’t the motd on login be achieve through something like `zenity –info –text=”$(cat /etc/motd)”` added to the session? (provided that /etc/motd has changed)

Comments are closed.