Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 18:42 +0200, Stanislav Brabec wrote: Rodrigo Moya wrote: On Tue, 2005-10-04 at 18:29 +0200, Stanislav Brabec wrote: Rodrigo Moya wrote: Otherwise pure GNOME user without any terminal opened will loose UPS power failure alert or report about incoming reboot or fatal failure reports from syslogd. gnome-power-manager deals with that now, displaying a dialog to the user when battery power is critical But for example apcupsd or nut uses wall. The same is valid for syslogd and shutdown. you're right. I've just added a simple line of text about this to the wiki (http://live.gnome.org/UnixPowerForDesktop look for 'System messages'). Please add whatever you want there. -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 04 Oct 2005 17:40:23 +0200, Rodrigo Moya wrote: It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session Given that libnotify messages aren't really meant for large amounts of text, I'm not sure that it's the right place to use it. Most MOTD messages on my university network are too large to fit in a notification and require at least basic formatting etc. I'd go for popping up a dialog in all cases, actually. thanks -mike (a notification-daemon author) ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Thu, 2005-10-06 at 12:03 +0100, Mike Hearn wrote: On Tue, 04 Oct 2005 17:40:23 +0200, Rodrigo Moya wrote: It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session Given that libnotify messages aren't really meant for large amounts of text, I'm not sure that it's the right place to use it. Most MOTD messages on my university network are too large to fit in a notification and require at least basic formatting etc. I'd go for popping up a dialog in all cases, actually. can't the notification daemon use scrolling when the messages are too big? -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Thu, 06 Oct 2005 16:26:16 +0200, Rodrigo Moya wrote: can't the notification daemon use scrolling when the messages are too big? Well, it could, but you have to keep the use cases for libnotify in mind: short, asynchronous notifications where it doesn't really matter if the user misses them. eg: - Manya has come online - Battery is low - You've got mail It's not meant for: - Informing the user of something they just initiated (I'm looking at you Robert ;) - Displaying user-critical information, which I'd rate MOTD as - Displaying arbitrary widgets. A scrollbar or some auto-scroll inside a notification would make them too complex in my view, and besides why bother when putting a text view or better a GtkMozEmbed inside a GTK+ window is so easy? thanks -mike ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Wed, 2005-10-05 at 09:31 +0800, Davyd Madeley wrote: On Tue, 2005-10-04 at 18:32 +0200, Rodrigo Moya wrote: On Tue, 2005-10-04 at 12:30 -0400, Pat Suwalski wrote: Is login the best time to show this information or would you prefer if the user saw it immediately? It might be nice to have GDM display this kind of information, polling for changes to /etc/motd every minute or so instead. some admins put sensible info on /etc/moptd, so we might not want to show it to anyone getting to the login screen. For that, /etc/issue might be better suited, although that is of no use for most users. I was thinking that next it might be fun to have an option to show /etc/issue on the GDM screen (of course, if you access it over XDMCP it would show /etc/issue.net). yes, that was my next planned step. I think this could definitely be useful to people. A checkbox might be nice (never show the message of the day again) which would not be visible when the Administrator has made the setting mandatory. at Novell we came up with a possible solution, which is to have MOTD just show up when a GConf key is set. Thus, it would be disabled by default, and the admins can enable it if they wish. The automatic updating is also a great idea. Administrators don't want some fancy HTML solution, they want a text file that gets shown to people when they log in. It is low tech, can be used to give information and it works. In addition, everyone knows where it is. Even many Windows admins have their NETLOGON.bat display the text from the MOTD (or even /etc/motd if they're using Samba) followed by a `pause` so that you can read it. Let's put it in. first, we need to branch gnome-session. Mark, so, what's your opinion, should we put it in? -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
MOTD implementation in gnome-session
Hi I have had this patch around for some time, and seems to work pretty well, so sending for comments and/or approval. It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session -- Rodrigo Moya [EMAIL PROTECTED] ? depcomp ? stamp-h1 ? gnome-session/gsm-motd.c ? gnome-session/gsm-motd.h Index: ChangeLog === RCS file: /cvs/gnome/gnome-session/ChangeLog,v retrieving revision 1.601 diff -u -p -r1.601 ChangeLog --- ChangeLog 24 Sep 2005 14:06:25 - 1.601 +++ ChangeLog 4 Oct 2005 15:35:46 - @@ -1,3 +1,11 @@ +2005-10-04 Rodrigo Moya [EMAIL PROTECTED] + + * configure.in: look for libnotify. + + * gnome-session/Makefile.am: + * gnome-session/main.c (main): + * gnome-session/gsm-motd.[ch]: added MOTD implementation. + 2005-09-24 Erdal Ronahi [EMAIL PROTECTED] * configure.in: Added ku (Kurdish) to ALL_LINGUAS Index: configure.in === RCS file: /cvs/gnome/gnome-session/configure.in,v retrieving revision 1.518 diff -u -p -r1.518 configure.in --- configure.in 24 Sep 2005 14:06:25 - 1.518 +++ configure.in 4 Oct 2005 15:35:46 - @@ -59,6 +59,24 @@ PKG_CHECK_MODULES(SOUND_TEST, $ESOUND_MO PKG_CHECK_MODULES(GNOME_SESSION, gtk+-2.0 = $GTK_REQUIRED libgnomeui-2.0 = $LIBGNOMEUI_REQUIRED $ESOUND_MODULE) +dnl Check if libnotify is present + +LIBNOTIFY_REQUIRED=0.2.1 +LIBNOTIFY_CFLAGS= +LIBNOTIFY_LIBS= +PKG_CHECK_MODULES(LIBNOTIFY, libnotify = $LIBNOTIFY_REQUIRED, + HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no) + +if test x$HAVE_LIBNOTIFY = xyes; then +AC_DEFINE(HAVE_LIBNOTIFY, 1, [libnotify available]) +AC_MSG_RESULT(available) +else +AC_MSG_RESULT(no) +fi + +AC_SUBST(LIBNOTIFY_CFLAGS) +AC_SUBST(LIBNOTIFY_LIBS) + dnl gconf checks AC_PATH_PROG(GCONFTOOL, gconftool-2, no) Index: gnome-session/Makefile.am === RCS file: /cvs/gnome/gnome-session/gnome-session/Makefile.am,v retrieving revision 1.108 diff -u -p -r1.108 Makefile.am --- gnome-session/Makefile.am 10 Jan 2005 16:36:40 - 1.108 +++ gnome-session/Makefile.am 4 Oct 2005 15:35:47 - @@ -4,6 +4,7 @@ defaultdir = $(datadir)/gnome INCLUDES = \ $(GNOME_SESSION_CFLAGS)\ + $(LIBNOTIFY_CFLAGS)\ $(STANDARD_PROPERTIES_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ @@ -26,7 +27,7 @@ STANDARD_PROPERTIES_CFLAGS = -DDATADIR=\$(datadir)\ \ $(NULL) -gnome_session_LDADD = $(X_LIBS) $(GNOME_SESSION_LIBS) $(LIBWRAP_LIBS) +gnome_session_LDADD = $(X_LIBS) $(GNOME_SESSION_LIBS) $(LIBWRAP_LIBS) $(LIBNOTIFY_LIBS) gnome_session_save_LDADD = $(GNOME_SESSION_LIBS) gnome_session_remove_LDADD = $(GNOME_SESSION_LIBS) gnome_session_properties_LDADD = $(GNOME_SESSION_LIBS) @@ -95,6 +96,8 @@ gnome_session_SOURCES = \ gsm-keyring.h \ gsm-gsd.c \ gsm-gsd.h \ + gsm-motd.c \ + gsm-motd.h \ gsm-protocol.c \ gsm-protocol.h \ gsm-remote-desktop.c \ Index: gnome-session/main.c === RCS file: /cvs/gnome/gnome-session/gnome-session/main.c,v retrieving revision 1.67 diff -u -p -r1.67 main.c --- gnome-session/main.c 25 Jul 2005 07:13:53 - 1.67 +++ gnome-session/main.c 4 Oct 2005 15:35:48 - @@ -48,6 +48,7 @@ #include gsm-xrandr.h #include gsm-at-startup.h #include gsm-remote-desktop.h +#include gsm-motd.h /* Flag indicating autosave - user won't be prompted on logout to * save the session */ @@ -461,7 +462,11 @@ main (int argc, char *argv[]) if (a_t_support) /* the ATs are happier if the session has started */ gsm_assistive_technologies_start (); + gsm_motd_start (); + gtk_main (); + + gsm_motd_stop (); gsm_remote_desktop_cleanup (); /* gdm-motd.c - Message of the Day support in gnome-session. Copyright (C) 1998, 1999 Tom Tromey This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include config.h #include glib/gi18n.h #include gtk/gtkmessagedialog.h #include libgnomevfs/gnome-vfs-ops.h #ifdef HAVE_LIBNOTIFY #include libnotify/notify.h #endif #include gsm-motd.h static gchar
Re: MOTD implementation in gnome-session
Hi Rodrigo, On Tue, 2005-10-04 at 17:40 +0200, Rodrigo Moya wrote: Hi I have had this patch around for some time, and seems to work pretty well, so sending for comments and/or approval. It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session I the first thing worth discussing is why?. Why is it a good idea to show /etc/motd at login? Thanks, Mark. ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
quote who=Mark McLoughlin I the first thing worth discussing is why?. Why is it a good idea to show /etc/motd at login? It's very handy for sysadmins to display information to the user at login. I've used zenity and very bad gnome-session hacks for this in the past. Our audience of desktop systems administrators will appreciate the feature. - Jeff -- Ubuntu USA Europe Tour: Oct-Nov 2005http://wiki.ubuntu.com/3BT So between a jazz musician, a murderer, and a congressperson, all called 'Dave Camp', I have a lot of pressure to be evil. - GNOME's Dave Camp ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 16:48 +0100, Mark McLoughlin wrote: Hi Rodrigo, On Tue, 2005-10-04 at 17:40 +0200, Rodrigo Moya wrote: Hi I have had this patch around for some time, and seems to work pretty well, so sending for comments and/or approval. It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session I the first thing worth discussing is why?. Why is it a good idea to show /etc/motd at login? for the same reason it is shown when you log in on a terminal. -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Wed, 2005-10-05 at 01:53 +1000, Jeff Waugh wrote: quote who=Mark McLoughlin I the first thing worth discussing is why?. Why is it a good idea to show /etc/motd at login? It's very handy for sysadmins to display information to the user at login. I've used zenity and very bad gnome-session hacks for this in the past. Our audience of desktop systems administrators will appreciate the feature. What kind of information is it especially handy for? Perhaps when you upgrade the desktop and you want to warn people that stuff has changed? But not for stuff like internet will be down for a while today because people may not actually log out that often? Is login the best time to show this information or would you prefer if the user saw it immediately? Would you expect each user to see this information only once? i.e. if you immediately logged out and back in again should you see the same message? If you had several messages over the course of a number of days, would you expect someone who logs in once a week to see all those messages or just the most recent one? Is plain old ASCII the best way to convey this information? Or would it be nice if you could display e.g. HTML? ... I do get that something along these lines would be useful for admins, but it strikes me that some crufty old unix hacker designed /etc/motd at least a couple of decades ago and perhaps we could put some thought into how whether that design best meets a desktop admin's requirements? Cheers, Mark. ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
Mark McLoughlin wrote: What kind of information is it especially handy for? Perhaps when you upgrade the desktop and you want to warn people that stuff has changed? But not for stuff like internet will be down for a while today because people may not actually log out that often? At a university, people will typically log in for 15 minutes, check eMail, course sites, etc. Then they will log out and go to class or lunch and come back and hour or two later. In the Windows network at my school they actually fullscreen-mode IE to show this sort of stuff. Extremely annoying. A notification-area message would be infinitely better. Is login the best time to show this information or would you prefer if the user saw it immediately? It might be nice to have GDM display this kind of information, polling for changes to /etc/motd every minute or so instead. Would you expect each user to see this information only once? i.e. if you immediately logged out and back in again should you see the same message? Sure, why not? snip I do get that something along these lines would be useful for admins, but it strikes me that some crufty old unix hacker designed /etc/motd at least a couple of decades ago and perhaps we could put some thought into how whether that design best meets a desktop admin's requirements? I think a very simple solution that is not overcomplicated (like remembering which messages have been read, etc) is a good thing. Anything more complicated is what eMail exists for. --Pat ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 17:11 +0100, Mark McLoughlin wrote: On Wed, 2005-10-05 at 01:53 +1000, Jeff Waugh wrote: quote who=Mark McLoughlin I the first thing worth discussing is why?. Why is it a good idea to show /etc/motd at login? It's very handy for sysadmins to display information to the user at login. I've used zenity and very bad gnome-session hacks for this in the past. Our audience of desktop systems administrators will appreciate the feature. What kind of information is it especially handy for? Perhaps when you upgrade the desktop and you want to warn people that stuff has changed? But not for stuff like internet will be down for a while today because people may not actually log out that often? Is login the best time to show this information or would you prefer if the user saw it immediately? my patch listens for changes in /etc/motd, so whenever that changes, logged in users would see the message. Would you expect each user to see this information only once? i.e. if you immediately logged out and back in again should you see the same message? that is probably a problem, to show always the same message in systems that have nothing interesting in that file. The problem is how to deal with this? -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 12:30 -0400, Pat Suwalski wrote: Is login the best time to show this information or would you prefer if the user saw it immediately? It might be nice to have GDM display this kind of information, polling for changes to /etc/motd every minute or so instead. some admins put sensible info on /etc/moptd, so we might not want to show it to anyone getting to the login screen. For that, /etc/issue might be better suited, although that is of no use for most users. -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 18:24, Rodrigo Moya wrote: that is probably a problem, to show always the same message in systems that have nothing interesting in that file. The problem is how to deal with this? Have some [] Never show me this message again button which remembers the last MOTD datestamp and annoys the user only when it changes. The default should even be to *not* show the MOTD if it hasn't been touched since install time. Xav ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 09:21 -0700, Sriram Ramkrishna wrote: It would be nice if it detects a change in the MOTD and notifies the user that it's changed (unless of course it already does that). it already does that -- Rodrigo Moya [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, 2005-10-04 at 18:33 +0200, Vincent Untz wrote: Le mardi 04 octobre 2005 à 17:40 +0200, Rodrigo Moya a écrit : Hi I have had this patch around for some time, and seems to work pretty well, so sending for comments and/or approval. It just makes gnome-session display the /etc/motd file on startup, using libnotify if available, or an ugly dialog if not. The 2 new files are to be placed in gnome-session/gnome-session Btw, there's a bug about this: http://bugzilla.gnome.org/show_bug.cgi?id=159604 Just thought I'd mention it so we can (hopefully) close the bug at the end of the discussion ;-) And Rodrigo can put his patch there as well :) --- Bastien Nocera [EMAIL PROTECTED] ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Re: MOTD implementation in gnome-session
On Tue, Oct 04, 2005 at 06:43:26PM +0200, Markus Jonsson wrote: What about when the system shuts down? Can I be informed about that? Can I be alerted and logged out in a nice way when someone else runs shutdown -h on the system? If you're in this situation it's most likely not going to be at home and that a sysadmin is going to be doing the reboot. In which case, I would hope he would be using whatever communication method he has (like mail) to say he wants to reboot the box. Or alternatively, Some dork is trying to reboot the system, click if you agree it's okay to reboot? Now how much trouble would that cause? :-) sri ___ desktop-devel-list mailing list desktop-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/desktop-devel-list