(resend) shutdown, reboot buttons lost from 2.10 logout dialog



(Sorry if this is a duplicate.  More than 12 hours have passed
since sending the original.)

Moving from Mandriva LE2005 to Mandriva 2006 has caused loss
of the shutdown and reboot buttons when logging out from a
Gnome session, at least on my systems that use runlevel 3
(text login) and no display manager.

I spent quite a bit of time searching and asking in a
Mandriva forum for a solution but found nothing useful.

Is there a reasonable way to give (selected) users back the
shutdown (and reboot) button(s)?

Switching to runlevel 5 and GDM is not an option.

My contingency plan, barring a more reasonable solution, is
to create empty files /etc/shutdown.allow.d/$USER for users
who are allowed to shut down a particular machine, then add
a couple lines of code to test for the file and set the
variables to true, then put the resulting binary in
/usr/local/bin.

Thanks in advance for suggestions.

-- 
Robert Riches
rm riches verizon net

PS: The root cause of the loss of the buttons appears to be
the following change in the source code:

*** ./gnome-session-2.8.1/gnome-session/logout.c
--- ./gnome-session-2.10.0/gnome-session/logout.c
***************
...
***************
*** 392,405 ****
                          FALSE, TRUE, 0);
      }
  
!   /* Red Hat specific code to check if the user has a
!    * good chance of being able to shutdown the system,
!    * and if so, give them that option
!    */
!   s = g_strconcat ("/var/lock/console/", g_get_user_name (), NULL);
!   t = g_strconcat ("/var/run/console/", g_get_user_name (), NULL);
!   if (((geteuid () == 0) || g_file_exists (t) || g_file_exists(s)) &&
!       access (halt_command[0], X_OK) == 0)
      {
        GtkWidget *title, *spacer;
        GtkWidget *action_vbox, *hbox;
--- 376,385 ----
                          FALSE, TRUE, 0);
      }
  
!   halt_supported   = gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN);
!   reboot_supported = gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT);
! 
!   if (halt_supported || reboot_supported)
      {
        GtkWidget *title, *spacer;
        GtkWidget *action_vbox, *hbox;
***************



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]