Re: Patch to enable reboot/shutdown from within the session
Alkis Georgopoulos <[email protected]> Fri, 04 Dec 2009 19:55:43 +0200
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
Some updates after Gadi's suggestions on IRC:
1) At the end of /usr/share/ldm/rc.d/X99-zzz-logout-action:
xprop -root -notype LDM_LOGOUT_ACTION | sed -ne 's/^LDM_LOGOUT_ACTION = "\(.*\)"/\1/p' > /var/run/ldm-logout-action || true
xprop -root -remove LDM_LOGOUT_ACTION
2) And the following code *somewhere*:
case "$(cat /var/run/ldm-logout-action)" in
REBOOT)
exec reboot -fp
;;
HALT)
exec shutdown -fp
;;
esac
somewhere =
a) In /usr/lib/ltsp/screen.d/ldm it works fine, but Gadi said we
shouldn't change the ldm script at this point.
or
b) In /usr/share/ldm/rc.d/I00-haltreboot it works, but has a little
flickering (X starts before the reboot/shutdown happens).
I'm OK with that.
Putting the script in rc.d/X* or rc.d/K* or in ldm.c leaves user
processes running, so it's *not* OK there.
So... I00-haltreboot it is. :-)
Thanks,
Alkis
Στις 04-12-2009, ημέρα Παρ, και ώρα 09:13 -0500, ο/η Gideon Romm έγραψε:
> Alkis,
>
> Rather than edit the LDM scren script, which I believe should never be
> done at this point, I would rather we do this:
>
> Create an "Init" script in the ldm/rc.d directory that does what you
> propose. Something like:
>
> /usr/share/ldm/rc.d/I00-haltreboot :
>
> case "$(cat /tmp/ldm-logout-action)" in
> REBOOT)
> exec reboot -fp
> ;;
> HALT)
> exec shutdown -fp
> ;;
> esac
>
> -Gadi
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_____________________________________________________________________
Ltsp-developer mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help, try #ltsp channel on irc.freenode.net