On Wed, Mar 31, 2010 at 02:17:07AM +0800, PCMan wrote: > We're willing to fix this, but can you explain in more detail how this > should work? Our developers don't use LTSP here so I have no idea how > it should work.
thanks so much for looking into this! LXDE and LTSP already go quite well together, and this would be a nice little improvement. the basic idea is that the user running lxde is logged into the server remotely. so lxde-logout is actually running on the server, not the physical machine the user is sitting in front of. so if lxde-logout were to shutdown or reboot, it would reboot the server the user is logged into, which is usually a multi-user server... so that's the basic problem. essentially, lxde-logout needs to detect this case somehow, and behave differently when the user is logged in remotely. if the user is logged in using LTSP, the environment variable LTSP_CLIENT will be set, so this could be used to detect when lxde-logout needs to behave differently. the mechanism LTSP has started using is X's xatoms, otherwise known as xproperties. this is used to set a flag in the X server that the machine the user is logged in from can get information from the server, and vice-versa. by setting the LTSP_LOGOUT_ACTION xproperty to either REBOOT or HALT, the user's machine will respond appropriately on logout, as LTSP has some scripts which check the value of LTSP_LOGOUT_ACTION. so for shutdown/reboot to work properly in an LTSP environment, lxde-logout should do a few things differently than usual: 1. present a logout button, no different than usual. 2. present a shutdown button, which sets the LTSP_LOGOUT_ACTION xproperty to "HALT", and then logs the user out just like a normal logout. 3. present a reboot button, which sets the LTSP_LOGOUT_ACTION xproperty to "REBOOT", and then logs the user out just like normal logout. i'm not sure how to set xproperties from C code, but worst case it could simply call the xprop binary from lxde-logout: xprop -root -f LTSP_LOGOUT_ACTION 8s -set LTSP_LOGOUT_ACTION HALT please let me know if you need more clarification. live well, vagrant > On Wed, Mar 31, 2010 at 2:15 AM, Andrew Lee <ajq...@debian.org> wrote: > > Hi PCMan, > > > > I am working on LXDE packaging for Debian 6.0 release. I'd hope this > > feature request would be included in Debian 6.0. > > > > Please read the report below from Vagrant Cascadian who is also one of > > the upsteam of LTSP. > > > > If you have any question, I think Vagrant Cascadian would love to answer. > > > > Cheers, > > > > -Andrew > > > > Vagrant Cascadian wrote: > >> Package: lxsession > >> Severity: wishlist > >> > >> in ltsp 5.1.98, a feature was introduced to allow thin clients to shut > >> down or > >> reboot by setting an X property/xatom, LTSP_LOGOUT_ACTION before logout. > >> > >> it would be great if lxsession-logout could support this by detecting an > >> LTSP > >> environment (using the environment variable LTSP_CLIENT=True), and if the > >> shutdown/reboot button is selected, set the appropriate X property instead > >> of > >> shutting down the server(while still logging the user out as usual). > >> > >> i tried looking at the lxsession-logout code to figure out a patch, but i > >> couldn't quite wrap my head into where to insert it. i'd be happy to test > >> code > >> or provide more clarification. > >> > >> from the commandline, for shutdown/halt: > >> > >> xprop -root -f LTSP_LOGOUT_ACTION 8s -set LTSP_LOGOUT_ACTION HALT > >> > >> for reboot/restart: > >> > >> xprop -root -f LTSP_LOGOUT_ACTION 8s -set LTSP_LOGOUT_ACTION REBOOT > >> > >> it could also be done with code to set the X property directly from > >> lxsession-logout. there's some example code for how to do it in > >> gnome-session > >> in a bug report on launchpad: > >> > >> https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/491940 > >> > >> thanks for considering the request! > >> > >> live well, > >> vagrant > >> > >> > > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org