diff -Naur xfce4-session-4.8.1.orig/xfce4-session/xfsm-manager.c xfce4-session-4.8.1/xfce4-session/xfsm-manager.c --- xfce4-session-4.8.1.orig/xfce4-session/xfsm-manager.c 2011-08-14 16:35:58.000000000 +0800 +++ xfce4-session-4.8.1/xfce4-session/xfsm-manager.c 2011-08-14 16:42:27.000000000 +0800 @@ -1136,6 +1136,39 @@ * up, so return control to the user */ return; } + /* hudson from easyU add following , to enable suhtdown/reboot*/ + if (manager->shutdown_type == XFSM_SHUTDOWN_HALT + || manager->shutdown_type == XFSM_SHUTDOWN_REBOOT) + { + XfsmShutdownHelper *shutdown_helper; + GError *error = NULL; + + shutdown_helper = xfsm_shutdown_helper_new (); + + if (!xfsm_shutdown_helper_send_command (shutdown_helper, + manager->shutdown_type, + &error)) + { + xfce_message_dialog (NULL, _("Shutdown Failed"), + GTK_STOCK_DIALOG_ERROR, + manager->shutdown_type == XFSM_SHUTDOWN_REBOOT + ? _("Failed to Reboot session") + : _("Failed to Halt session"), + error->message, + GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT, + NULL); + g_error_free (error); + } + + /* clean up and return */ + g_object_unref (shutdown_helper); + + + /* at this point, either we failed to suspend/hibernate, or we + * successfully suspended/hibernated, and we've been woken back + * up, so return control to the user */ + return; + } } #if defined(__NR_ioprio_set) && defined(HAVE_SYNC) /* if we're on Linux and have ioprio_set(), we start sync()ing the