FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu Development

 
 
LinkBack Thread Tools
 
Old 03-27-2010, 06:06 PM
Alkis Georgopoulos
 
Default Patch for LTSP clients to properly reboot/shutdown

The LTSP user session is running on the server through ssh -X.
The shutdown will need to be executed on the client.
LTSP is using xprops as a mechanism for the server to notify the client to execute something. It is indeed a hack, but that's the "standard" way we do it in LTSP. That's also the way localapps are implemented.

So when the user initiates shutdown, either from the indicator-session applet or from the session dialog (tested and working), an xprop is set. LTSP sessions are remote (ssh) sessions, so ConsoleKit does not consider them active. So a logoff is performed instead of a shutdown/reboot.
After the logoff, the LTSP display manager reads the xprop and sees if it needs to reboot or halt the client.

One better way to resolve this would be to implement appropriate dbus
hooks so that the session bus running on the server "talks" to the
system bus running on the client. Unfortunately, I don't think any LTSP
developer is working on implementing this, and I don't even know if it
can be accomplished.

In previous Ubuntu releases there was a patch in fusa that was hiding
the reboot/shutdown menus for LTSP clients. This isn't used anymore, so
now those menus are there but are just performing "logoff" instead,
confusing the users.

So I'm not aware of any other realistic way to have working
shutdown/reboot menus in LTSP, other than the attached patch.

Kind regards,
Alkis Georgopoulos
Edubuntu/LTSP developer

--
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: Fix Released

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



--
edubuntu-devel mailing list
edubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-devel
 
Old 03-29-2010, 07:02 PM
Alkis Georgopoulos
 
Default Patch for LTSP clients to properly reboot/shutdown

Reopening in LTSP, as it seems we'll need to find another method in
order to get working shutdown/reboot menus, and I'm not sure if we have
enough time left to make it for Lucid.

Maybe the indicator-session applet could be patched instead, like fusa
was in previous releases, although patching gnome-session was much
better because it worked with the session dialog as well, and with
applications like iTalc that directly call dbus.

It'll be the first LTS release with that problem... if any fellow
teacher needs a patched gnome-session to avoid having to explain to the
students why the reboot/shutdown menus in Ubuntu are not working, he may
find one in the PPA for Greek schools:
https://launchpad.net/~ts.sch.gr/+archive/ppa/

** Changed in: ltsp (Ubuntu)
Status: Fix Released => Confirmed

** Changed in: ltsp (Ubuntu)
Assignee: Alkis Georgopoulos (alkisg) => (unassigned)

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



--
edubuntu-devel mailing list
edubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-devel
 
Old 04-03-2010, 08:25 AM
Alkis Georgopoulos
 
Default Patch for LTSP clients to properly reboot/shutdown

LXDE has added upstream support for LTSP reboot/shutdown, using the same method as the patch proposed here.
http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxsession;a=commit;h=d2508534100fddbac931fa60e3b98 9ae54ddf147

Thanks, pcman and vagrantc.

Maybe we'd have better luck trying upstream gnome support too...

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



--
edubuntu-devel mailing list
edubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-devel
 
Old 05-12-2010, 10:27 PM
Alkis Georgopoulos
 
Default Patch for LTSP clients to properly reboot/shutdown

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



--
edubuntu-devel mailing list
edubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-devel
 

Thread Tools




All times are GMT. The time now is 05:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org