[Bug 491940] Re: Patch for LTSP clients to properly reboot/shutdown
Alkis Georgopoulos
491940 at bugs.launchpad.net
Wed Jul 6 12:31:52 UTC 2011
Sorry, no idea. We're using only LTS releases here, and I'm kinda
pressed time-wise this year, so I won't be able to test with recent
versions of the involved packages until Ubuntu 12.04, if it's still a
problem then.
The LTSP task mainly referred to LTSP_LOGOUT_ACTION (commit
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-
trunk/revision/1481), so yeah, either invalid or committed will do,
until gnome-session can provide a method to notify the caller (LDM,
xinit...) about the selected action (logout, reboot, shutdown).
Another approach is to at least make indicator-session policy-kit aware, so that it doesn't display the reboot/shutdown menu items at all:
https://bugs.launchpad.net/ubuntu/+source/indicator-session/+bug/474392
>From a user's perspective, that's not as good as fixing gnome-session,
because then the user loses logout/reboot/shutdown functionality from
the menus.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ltsp in Ubuntu.
https://bugs.launchpad.net/bugs/491940
Title:
Patch for LTSP clients to properly reboot/shutdown
Status in “gnome-session” package in Ubuntu:
New
Status in “ltsp” package in Ubuntu:
Invalid
Bug description:
Binary package hint: gnome-session
Please consider the following 4 lines for inclusion to debian/patch/95_dbus_request_shutdown.patch.
Those lines make LTSP clients properly reboot/shutdown.
gboolean
gsm_manager_request_shutdown (GsmManager *manager,
GError **error)
{
g_debug ("GsmManager: RequestShutdown called");
g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) {
g_set_error (error,
GSM_MANAGER_ERROR,
GSM_MANAGER_ERROR_NOT_IN_RUNNING,
"RequestShutdown interface is only available during the Running phase");
return FALSE;
}
+ if (g_getenv ("LTSP_CLIENT"))
+ g_spawn_command_line_async("xprop -root -f LDM_LOGOUT_ACTION 8s -set LDM_LOGOUT_ACTION HALT", error);
request_shutdown (manager);
return TRUE;
}
gboolean
gsm_manager_request_reboot (GsmManager *manager,
GError **error)
{
g_debug ("GsmManager: RequestReboot called");
g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) {
g_set_error (error,
GSM_MANAGER_ERROR,
GSM_MANAGER_ERROR_NOT_IN_RUNNING,
"RequestReboot interface is only available during the Running phase");
return FALSE;
}
+ if (g_getenv ("LTSP_CLIENT"))
+ g_spawn_command_line_async("xprop -root -f LDM_LOGOUT_ACTION 8s -set LDM_LOGOUT_ACTION REBOOT", error);
request_reboot (manager);
return TRUE;
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/491940/+subscriptions
More information about the foundations-bugs
mailing list