[Bug 491940] Re: Patch for LTSP clients to properly reboot/shutdown

Alkis Georgopoulos alkisg at gmail.com
Wed May 12 22:27:39 UTC 2010


I've uploaded a patched gnome-session package in the Greek schools ppa.
Now the clients properly reboot/shutdown from gnome-panel or from iTalc.

Anyone interested may other add the ppa to his sources and update by doing
  `sudo add-apt-repository ppa:ts.sch.gr && sudo apt-get update && sudo apt-get dist-upgrade`
or he can manually download the .deb from
  https://launchpad.net/~ts.sch.gr/+archive/ppa/+sourcepub/1134508/+listing-archive-extra

I tried to press the shutdown button on a thin client to test if the
session menu would also work, but that button event never reaches the
server, so I didn't even see the session menu (dbus events from the thin
clients system bus do not propagate to the server). So the patched
package works in all reproducible cases for me.

-- 
Patch for LTSP clients to properly reboot/shutdown
https://bugs.launchpad.net/bugs/491940
You received this bug notification because you are a member of Edubuntu
Bugsquad, which is subscribed to ltsp in ubuntu.

Status in “gnome-session” package in Ubuntu: New
Status in “ltsp” package in Ubuntu: Confirmed

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;
}






More information about the edubuntu-devel mailing list