Re: Patch to enable reboot/shutdown from within the session
Stéphane Graber <stgraber-GeWIH/[email protected]> Sat, 05 Dec 2009 14:54:44 -0500
| Newsgroups | gmane.linux.terminal-server.devel |
|---|---|
| Message-ID | <[email protected]> |
Alkis Georgopoulos wrote:
> 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
I guess we can put it in /usr/share/ltsp/screen-session.d, that way
it'll be called before X is actually started.
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
------------------------------------------------------------------------------
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