[26425] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25556 r25557 -

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Mon Jun 4 23:31:25 2012

Date: Mon, 4 Jun 2012 23:31:20 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201206032121.q53LLueR028581@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1206042330180.18441@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

ACK this and r25556.
I wonder a little bit if we want to throw a versioned dependency in 
somewhere, but I think things will be okay.
-Ben

On Sun, 3 Jun 2012, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2012-06-03 17:21:56 -0400 (Sun, 03 Jun 2012)
> New Revision: 25557
>
> Added:
>   trunk/debathena/debathena/kiosk/debian/lightdm-launch-kiosk
> Modified:
>   trunk/debathena/debathena/kiosk/debian/changelog
>   trunk/debathena/debathena/kiosk/debian/debathena-kiosk.install
>   trunk/debathena/debathena/kiosk/debian/debathena-kiosk.postinst
> Log:
> In kiosk:
>  * Support launching from lightdm
>
>
> Modified: trunk/debathena/debathena/kiosk/debian/changelog
> ===================================================================
> --- trunk/debathena/debathena/kiosk/debian/changelog	2012-06-03 21:19:10 UTC (rev 25556)
> +++ trunk/debathena/debathena/kiosk/debian/changelog	2012-06-03 21:21:56 UTC (rev 25557)
> @@ -6,8 +6,9 @@
>   * Add a gconf-tree.xml to prevent [redacted] (Trac: 1130)
>   * Tweak wording on home page.
>   * Don't launch the kiosk mode if an update is in progress (Trac: #1006)
> +  * Support launching from lightdm
>
> - -- Jonathan Reed <jdreed@mit.edu>  Sun, 03 Jun 2012 14:26:05 -0400
> + -- Jonathan Reed <jdreed@mit.edu>  Sun, 03 Jun 2012 17:21:52 -0400
>
> debathena-kiosk (1.4.4) unstable; urgency=low
>
>
> Modified: trunk/debathena/debathena/kiosk/debian/debathena-kiosk.install
> ===================================================================
> --- trunk/debathena/debathena/kiosk/debian/debathena-kiosk.install	2012-06-03 21:19:10 UTC (rev 25556)
> +++ trunk/debathena/debathena/kiosk/debian/debathena-kiosk.install	2012-06-03 21:21:56 UTC (rev 25557)
> @@ -10,3 +10,4 @@
> gdm-launch-kiosk usr/lib/debathena-kiosk
> gdm-launch-kiosk.glade usr/share/debathena-kiosk
> %gconf-tree.xml usr/share/debathena-kiosk
> +lightdm-launch-kiosk usr/lib/debathena-kiosk
>
> Modified: trunk/debathena/debathena/kiosk/debian/debathena-kiosk.postinst
> ===================================================================
> --- trunk/debathena/debathena/kiosk/debian/debathena-kiosk.postinst	2012-06-03 21:19:10 UTC (rev 25556)
> +++ trunk/debathena/debathena/kiosk/debian/debathena-kiosk.postinst	2012-06-03 21:21:56 UTC (rev 25557)
> @@ -32,6 +32,7 @@
> ### BEGIN debathena-kiosk
> # gdm can launch kiosk mode
> gdm ALL=NOPASSWD: /usr/lib/debathena-kiosk/launch-kiosk
> +lightdm ALL=NOPASSWD: /usr/lib/debathena-kiosk/launch-kiosk
> ### END debathena-kiosk
> EOF
>         fi
>
> Added: trunk/debathena/debathena/kiosk/debian/lightdm-launch-kiosk
> ===================================================================
> --- trunk/debathena/debathena/kiosk/debian/lightdm-launch-kiosk	                        (rev 0)
> +++ trunk/debathena/debathena/kiosk/debian/lightdm-launch-kiosk	2012-06-03 21:21:56 UTC (rev 25557)
> @@ -0,0 +1,41 @@
> +#!/usr/bin/python -Wall
> +
> +import dbus
> +import dbus.mainloop.glib
> +import gtk
> +import gtk.glade
> +import gobject
> +import time
> +import os
> +import sys
> +import subprocess
> +from optparse import OptionParser
> +
> +LAUNCH_COMMAND = "/usr/lib/debathena-kiosk/launch-kiosk"
> +
> +
> +def main():
> +    pid = os.fork()
> +    if pid == 0:
> +        # Start a new session.
> +        os.setsid();
> +            # Fork another child to launch the command.
> +        pid = os.fork()
> +        if pid == 0:
> +            # Here in the second child, exec the command.
> +            try:
> +                os.execlp("sudo", "sudo", "-n", LAUNCH_COMMAND)
> +            except OSError, e:
> +                print "error: Could not run %s as root: %s" % (LAUNCH_COMMAND, e.strerror)
> +                os._exit(255)
> +        else:
> +            # The first child exits immediately.
> +            os._exit(0)
> +    else:
> +        # Here in the parent: wait for the first child to exit.
> +        (pid, status) = os.waitpid(pid, 0)
> +        if status != 0:
> +            print "error launching command, status %d" % status
> +
> +if __name__ == '__main__':
> +    main()
>
>
> Property changes on: trunk/debathena/debathena/kiosk/debian/lightdm-launch-kiosk
> ___________________________________________________________________
> Added: svn:executable
>   + *
>
>

home help back first fref pref prev next nref lref last post