[28367] in Source-Commits

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

kiosk commit: Major rewrite; use standard session codepath

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Jul 31 17:18:30 2014

Date: Thu, 31 Jul 2014 17:18:23 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201407312118.s6VLINYZ024220@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/kiosk/commit/541716dd88f815a1db5ea40d524a504084043013
commit 541716dd88f815a1db5ea40d524a504084043013
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Tue Jul 29 15:16:41 2014 -0400

    Major rewrite; use standard session codepath
    
    - Drop the r-kiosk extension because it's hopelessly bitrotted.
    - Don't spawn our own VT; go through the standard login session
      codepath (Trac: #628)
    - Drop support for things that are not lightdm
    - Change the .desktop file to launch the xsession
    - Move the kiosk user homedir to /var/lib
    - Switch from a modal dialog to notify-send to tell users that they
      don't get to print (Trac: #1424)
    - Switch to dh7, and update build dependencies
    - Depend on the version of lightdm-config that special-cases the kiosk
      session
    - Update the control file to discourage people from using this (since
      it enables nopasswdlogin for a user)
    - Drop a ~/.xsessionrc into the kiosk user's homedir (in the postinst),
      otherwise GVFS blocks the chroot (Trac: #1500)

 chrome.manifest.r-kiosk            |    4 -
 debathena-kiosk-session            |   51 +++++++++++++
 debian/changelog                   |   13 ++++
 debian/control                     |   18 +++---
 debian/debathena-kiosk.desktop     |    6 +-
 debian/debathena-kiosk.install     |   11 +--
 debian/debathena-kiosk.maintscript |    1 +
 debian/debathena-kiosk.postinst    |   12 +++-
 debian/dot-xsessionrc              |    1 +
 debian/rules                       |    7 +--
 gdm-launch-kiosk                   |  141 ------------------------------------
 gdm-launch-kiosk.glade             |   87 ----------------------
 launch-kiosk                       |   51 -------------
 lightdm-launch-kiosk               |   32 --------
 r-kiosk.xpi                        |  Bin 7268 -> 0 bytes
 xinitrc                            |   79 --------------------
 16 files changed, 93 insertions(+), 421 deletions(-)

diff --git a/chrome.manifest.r-kiosk b/chrome.manifest.r-kiosk
deleted file mode 100644
index cd77862..0000000
--- a/chrome.manifest.r-kiosk
+++ /dev/null
@@ -1,4 +0,0 @@
-content rkiosk jar:chrome/rkiosk.jar!/content/rkiosk/
-overlay chrome://browser/content/browser.xul chrome://rkiosk/content/rkioskbrowser.xul
-overlay chrome://mozapps/content/xpinstall/xpinstallConfirm.xul chrome://rkiosk/content/rkioskxpinstallConfirm.xul
-overlay chrome://mozapps/content/downloads/unknownContentType.xul chrome://rkiosk/content/rkioskunknownContentType.xul
diff --git a/debathena-kiosk-session b/debathena-kiosk-session
new file mode 100755
index 0000000..16eee92
--- /dev/null
+++ b/debathena-kiosk-session
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# This is the xsession script for the kiosk user.
+
+datadir=/usr/share/debathena-kiosk
+user="kiosk@mit"
+
+# Sanity check.  The greeter will hide it anyway, but
+# we really don't want to scribble over the user's $HOME by accident
+if [ "$(id -nu)" != "$user" ]; then
+    zenity --info --title="Session Not Available" --text="This session is not available.  Please select another session type."
+    exit 0
+fi
+
+# File with preferences to set in the firefox profile.
+prefs="$datadir/prefs.js"
+
+# User chrome (UI customizations) file.
+chrome="$datadir/userChrome.css"
+
+cd || exit 1
+
+# Run a window manager so that firefox fullscreen mode works.
+metacity --sm-disable &
+
+# Create a new firefox profile.
+rm -rf .mozilla
+firefox -CreateProfile default > /dev/null || exit 1
+profdir=$(find .mozilla/firefox -type d -name \*.default)
+
+# Apply our preference settings and UI customizations.
+cat "$prefs" >> "$profdir/prefs.js" || exit 1
+mkdir -p "$profdir/chrome"
+cp "$chrome" "$profdir/chrome/userChrome.css" || exit 1
+
+# Launch firefox.
+if [ -x /usr/bin/bugme ]; then
+    bugme --fatal --corner SE firefox &
+    pid=$!
+    # Warn the user that printing is wrong.
+    # And do it after firefox starts, because otherwise the notification
+    # ends up under it
+    notify-send -t 5000 "No Printing" "You will not be able to print from this browser session.  Any print jobs will be discarded."
+    wait $pid
+
+else
+    zenity --no-wrap --error --text="Sorry, unable to launch kiosk browser.\nThis workstation may be misconfigured."
+fi
+
+# Clean up.
+rm -rf .mozilla
diff --git a/debian/changelog b/debian/changelog
index 3351155..e8928f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+debathena-kiosk (1.5) unstable; urgency=low
+
+  * Don't start a VT anymore; behave as a normal session
+  * Drop support for r-kiosk because it has sufficiently bitrotted so as
+    to be useless
+  * Move the kiosk user's homedir to /var/lib so as not to have to
+    special-case snapshot-run to not remove /home
+  * Update Build-For field
+  * Drop support for gdm
+  * Convert to dh7
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 30 Jul 2014 10:30:33 -0400
+
 debathena-kiosk (1.4.10) unstable; urgency=low
 
   [ Jonathan Reed ]
diff --git a/debian/control b/debian/control
index 5f6ea8e..41d3f1b 100644
--- a/debian/control
+++ b/debian/control
@@ -2,17 +2,17 @@ Source: debathena-kiosk
 Section: debathena/web
 Priority: extra
 Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: cdbs, debhelper, dh-buildinfo, debathena-gdm
+Build-Depends: debhelper (>= 8.1.0~)
 Standards-Version: 3.9.3
 
 Package: debathena-kiosk
-X-Debathena-Build-For: lucid natty precise
+X-Debathena-Build-For: precise trusty
 Architecture: all
 Depends: ${misc:Depends}, firefox | iceweasel, metacity, unzip, adduser,
- gdm, python, python-gtk2, python-glade2, python-dbus, sun-java6-plugin | icedtea6-plugin, debathena-bugme (>= 10.0.5-0debathena1~), sudo (>= 1.7.2p1-1~)
-Description: Starts a kiosk mode web browser on a new virtual terminal
- This package provides a tool to launch a separate X11 session, running
- a kiosk mode web browser, on a new virtual terminal.  It is most useful
- when configured to be invoked as a custom command from gdm, to enable
- functions such as registering for an Athena account from a pre-login
- environment.
+ debathena-lightdm-config (>= 1.13.2~), python, python-gtk2, python-glade2,
+ python-dbus, debathena-bugme (>= 10.0.5-0debathena1~), sudo (>= 1.7.2p1-1~)
+Description: Provides a restricted kiosk mode for cluster machines
+ This package provides a tool to launch a browser from the greeter.
+ It is designed for IS&T cluster workstations only, and makes a number
+ of assumptions about how the workstation is configured.  Installing
+ this on your personal Debathena workstation is probably a bad idea.
diff --git a/debian/debathena-kiosk.desktop b/debian/debathena-kiosk.desktop
index bdb68c1..0ede2bd 100644
--- a/debian/debathena-kiosk.desktop
+++ b/debian/debathena-kiosk.desktop
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Type=Application
 Name=Kiosk mode browser
-TryExec=/usr/lib/debathena-kiosk/gdm-launch-kiosk
-Exec=/usr/lib/debathena-kiosk/gdm-launch-kiosk
-OnlyShowIn=GNOME;
+TryExec=/usr/lib/debathena-kiosk/debathena-kiosk-session
+Exec=/usr/lib/debathena-kiosk/debathena-kiosk-session
+Comment=Kiosk mode browser
diff --git a/debian/debathena-kiosk.install b/debian/debathena-kiosk.install
index d9003dc..196c3bd 100644
--- a/debian/debathena-kiosk.install
+++ b/debian/debathena-kiosk.install
@@ -1,14 +1,9 @@
 index.html usr/share/debathena-kiosk
-launch-kiosk usr/lib/debathena-kiosk
 prefs.js usr/share/debathena-kiosk
-r-kiosk.xpi usr/share/debathena-kiosk
-chrome.manifest.r-kiosk usr/share/debathena-kiosk
 userChrome.css usr/share/debathena-kiosk
-xinitrc usr/share/debathena-kiosk
+debathena-kiosk-session usr/lib/debathena-kiosk
 images usr/share/debathena-kiosk
 styles usr/share/debathena-kiosk
-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
-debian/debathena-kiosk-sudoers etc/sudoers.d
+debian/debathena-kiosk.desktop usr/share/xsessions
+debian/dot-xsessionrc usr/share/debathena-kiosk
diff --git a/debian/debathena-kiosk.maintscript b/debian/debathena-kiosk.maintscript
new file mode 100644
index 0000000..501fa46
--- /dev/null
+++ b/debian/debathena-kiosk.maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/sudoers.d/debathena-kiosk-sudoers 1.5~
diff --git a/debian/debathena-kiosk.postinst b/debian/debathena-kiosk.postinst
index 0bc37d8..efe55c6 100755
--- a/debian/debathena-kiosk.postinst
+++ b/debian/debathena-kiosk.postinst
@@ -22,10 +22,18 @@ case "$1" in
     configure)
         # Add the kiosk user.
         user=kiosk@mit
+	# note that usermod -m is rename(2) and will not
+	# do the equivalent of mkdir -p
+	homedir=/var/lib/debathena-kiosk-home
         if ! getent passwd $user >/dev/null; then
-            adduser --system --force-badname $user
+            adduser --system --force-badname \
+		--home "$homedir" $user
+	elif dpkg --compare-versions "$2" lt 1.5~; then
+	    usermod --move-home --home "$homedir" $user
         fi
-	chmod 0440 /etc/sudoers.d/debathena-kiosk-sudoers
+	adduser $user nopasswdlogin
+	cp -f /usr/share/debathena-kiosk/dot-xsessionrc "${homedir}/.xsessionrc"
+	chown "$user" "${homedir}/.xsessionrc"
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/dot-xsessionrc b/debian/dot-xsessionrc
new file mode 100644
index 0000000..cb720ee
--- /dev/null
+++ b/debian/dot-xsessionrc
@@ -0,0 +1 @@
+export GVFS_DISABLE_FUSE=1
diff --git a/debian/rules b/debian/rules
index 33fc46a..2d33f6a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,4 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-
-install/debathena-kiosk::
-	dh_install debian/debathena-kiosk.desktop usr/share/gdm/autostart/LoginWindow
-
+%:
+	dh $@
diff --git a/gdm-launch-kiosk b/gdm-launch-kiosk
deleted file mode 100755
index 86f5939..0000000
--- a/gdm-launch-kiosk
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/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
-
-GLADE_FILE = "/usr/share/debathena-kiosk/gdm-launch-kiosk.glade"
-LAUNCH_COMMAND = "/usr/lib/debathena-kiosk/launch-kiosk"
-
-SM_DBUS_NAME = "org.gnome.SessionManager"
-SM_DBUS_PATH = "/org/gnome/SessionManager"
-SM_DBUS_INTERFACE = "org.gnome.SessionManager"
-SM_CLIENT_DBUS_INTERFACE = "org.gnome.SessionManager.ClientPrivate"
-APP_ID = "debathena-kiosk"
-
-class Kiosk:
-    def __init__(self):
-        self.sessionEnding = False
-        self.sessionBus = dbus.SessionBus()
-        try:
-            self.register_with_sm()
-            self.init_sm_client()
-        except:
-            print "Warning: Cannot register with session manager."
-
-        try:
-            self.xml = gtk.glade.XML(GLADE_FILE)
-        except:
-            print "Failed to create Glade XML object."
-            sys.exit(1)
-        self.kioskWindow = self.xml.get_widget('KioskWindow')
-        self.kioskDialog = self.xml.get_widget('KioskDialog')
-        self.xml.signal_autoconnect(self)
-        # Turn off all window decorations for the login screen.
-        self.kioskWindow.set_decorated(False)
-        # Because the resize anchor in Natty is obscenely large
-        self.kioskWindow.set_property('resizable', False)
-        self.kioskDialog.set_decorated(False)
-        # Position the window near the bottom of the screen, in the center.
-        self.kioskWindow.set_gravity(gtk.gdk.GRAVITY_SOUTH)
-        width, height = self.kioskWindow.get_size()
-        self.kioskWindow.move((gtk.gdk.screen_width() - width) / 2,
-                              gtk.gdk.screen_height() - height - 80)
-        self.kioskWindow.show_all()
-
-    def kioskButton_on_click(self, button):
-        if not self.sessionEnding:
-            if os.path.exists("/var/run/athena-nologin"):
-                errDlg = gtk.MessageDialog(self.kioskWindow, 
-                                           gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
-                                           gtk.MESSAGE_ERROR,
-                                           gtk.BUTTONS_CLOSE,
-                                           "This machine is currently taking an update and the kiosk browser can't be launched.  Please try again later.")
-                errDlg.run()
-                errDlg.destroy()
-            else:
-                self.kioskDialog.run()
-
-    def kioskDialogResponseHandler(self, dialog, response_id):
-        if response_id == 1 and not self.sessionEnding:
-            self.launch()
-        self.kioskDialog.hide()
-
-    def launch(self):
-        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
-
-    # Connect to the session manager, and register our client.
-    def register_with_sm(self):
-        proxy = self.sessionBus.get_object(SM_DBUS_NAME, SM_DBUS_PATH)
-        sm = dbus.Interface(proxy, SM_DBUS_INTERFACE)
-        autostart_id = os.getenv("DESKTOP_AUTOSTART_ID", default="")
-        self.smClientId = sm.RegisterClient(APP_ID, autostart_id)
-
-    # Set up to handle signals from the session manager.
-    def init_sm_client(self):
-        proxy = self.sessionBus.get_object(SM_DBUS_NAME, self.smClientId)
-        self.smClient = dbus.Interface(proxy, SM_CLIENT_DBUS_INTERFACE)
-        self.smClient.connect_to_signal("QueryEndSession",
-                                         self.sm_on_QueryEndSession)
-        self.smClient.connect_to_signal("EndSession", self.sm_on_EndSession)
-        self.smClient.connect_to_signal("CancelEndSession",
-                                         self.sm_on_CancelEndSession)
-        self.smClient.connect_to_signal("Stop", self.sm_on_Stop)
-
-    # Here on a QueryEndSession signal from the session manager.
-    def sm_on_QueryEndSession(self, flags):
-        self.sessionEnding = True
-        # Response args: is_ok, reason.
-        self.smClient.EndSessionResponse(True, "")
-
-    # Here on an EndSession signal from the session manager.
-    def sm_on_EndSession(self, flags):
-        self.sessionEnding = True
-        # Response args: is_ok, reason.
-        self.smClient.EndSessionResponse(True, "")
-
-    # Here on a CancelEndSession signal from the session manager.
-    def sm_on_CancelEndSession(self):
-        self.sessionEnding = False
-
-    # Here on a Stop signal from the session manager.
-    def sm_on_Stop(self):
-        gtk.main_quit()
-
-def main():
-    if not os.access(GLADE_FILE, os.R_OK):
-        print 'error: Unable to read glade file "' + GLADE_FILE + '"'
-        sys.exit(1)
-    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-    Kiosk()
-    gtk.main()
-
-if __name__ == '__main__':
-    main()
diff --git a/gdm-launch-kiosk.glade b/gdm-launch-kiosk.glade
deleted file mode 100644
index 73f2f8e..0000000
--- a/gdm-launch-kiosk.glade
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Nov 20 17:32:41 2009 -->
-<glade-interface>
-  <widget class="GtkWindow" id="KioskWindow">
-    <property name="title" translatable="yes">Kiosk</property>
-    <property name="accept_focus">False</property>
-    <property name="focus_on_map">False</property>
-    <property name="decorated">False</property>
-    <property name="gravity">GDK_GRAVITY_SOUTH</property>
-    <child>
-      <widget class="GtkHBox" id="KioskHbox">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkButton" id="KioskButton">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="has_tooltip">True</property>
-            <property name="tooltip_text">Browse the web, register for an Athena account, etc.</property>
-            <property name="tooltip" translatable="yes">Browse the web, register for an Athena account, etc.</property>
-            <property name="label" translatable="yes">Browse / Register for Account</property>
-            <property name="response_id">0</property>
-            <signal name="clicked" handler="kioskButton_on_click"/>
-          </widget>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="KioskDialog">
-    <property name="border_width">5</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="decorated">False</property>
-    <property name="transient_for">KioskWindow</property>
-    <signal name="response" handler="kioskDialogResponseHandler"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkLabel" id="KioskDialogLabel">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Click OK to launch a restricted web browser.
-This can be used to register for an Athena account.
-Click Cancel to login to a standard Athena session.</property>
-            <property name="wrap">True</property>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-            <child>
-              <widget class="GtkButton" id="KioskCancelbutton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">Cancel</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="KioskOKButton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">OK</property>
-                <property name="response_id">1</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/launch-kiosk b/launch-kiosk
deleted file mode 100755
index 4f62e60..0000000
--- a/launch-kiosk
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-# Start an X server for the kiosk user on an available VT.
-
-if [ "$(id -u)" -ne 0 ]; then
-  echo "You must be root to launch kiosk mode." 1>&2
-  exit 1
-fi
-
-datadir=/usr/share/debathena-kiosk
-kiosk_user=kiosk@mit
-kiosk_group=nogroup
-kiosk_home="/home/$kiosk_user"
-kiosk_vt_file=/var/run/athena-kiosk-vt
-display=99
-unset XAUTHORITY
-
-# See if we already have a running kiosk session.
-kiosk_vt=$(cat "$kiosk_vt_file" 2>/dev/null)
-if [ -n "$kiosk_vt" ]; then
-  chvt "$kiosk_vt" && exit 0
-fi
-
-# Get the VT to use.
-kiosk_vt=$(fgconsole --next-available)
-if [ -z "$kiosk_vt" ]; then
-  echo "$0: No available VTs" 1>&2
-  exit 1
-fi
-
-# Remember that we have allocated a VT for a kiosk session.
-echo "$kiosk_vt" > "$kiosk_vt_file"
-
-# Set up the kiosk user home directory.
-rm -rf "$kiosk_home"
-mkdir "$kiosk_home"
-cp "$datadir/xinitrc" "$kiosk_home/.xinitrc"
-mkdir "$kiosk_home/.gconf"
-cp "$datadir/%gconf-tree.xml" "$kiosk_home/.gconf/"
-chown -R "$kiosk_user":"$kiosk_group" "$kiosk_home"
-
-# Launch the session on our VT, and wait for it to complete.  This will
-# switch back to the current VT upon completion.
-openvt -c "$kiosk_vt" -s -w -- su -s /bin/sh -c "startx -- :$display -br \
-  -audit 0 -nolisten tcp vt$kiosk_vt" "$kiosk_user"
-
-# Ensure that the VT is deallocated.
-deallocvt "$kiosk_vt" > /dev/null 2>&1
-rm -f "$kiosk_vt_file"
-
-rm -f "$kiosk_home/.Xauthority"
diff --git a/lightdm-launch-kiosk b/lightdm-launch-kiosk
deleted file mode 100755
index db2cf25..0000000
--- a/lightdm-launch-kiosk
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/python -Wall
-
-import os
-
-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()
diff --git a/r-kiosk.xpi b/r-kiosk.xpi
deleted file mode 100644
index db12457..0000000
Binary files a/r-kiosk.xpi and /dev/null differ
diff --git a/xinitrc b/xinitrc
deleted file mode 100644
index fedec83..0000000
--- a/xinitrc
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# This is the xinit script for the kiosk user.
-
-datadir=/usr/share/debathena-kiosk
-
-# The rkiosk extension's unique ID, and the location of its xpi file.
-rkiosk_id="{4D498D0A-05AD-4fdb-97B5-8A0AABC1FC5B}"
-rkiosk_xpi=$datadir/r-kiosk.xpi
-
-# File with preferences to set in the firefox profile.
-prefs="$datadir/prefs.js"
-
-# User chrome (UI customizations) file.
-chrome="$datadir/userChrome.css"
-
-cd || exit 1
-
-exec > xinit.log 2>&1
-
-XAUTHORITY=$HOME/.Xauthority
-export XAUTHORITY
-
-# Run a window manager so that firefox fullscreen mode works.
-metacity --sm-disable &
-
-choice=$(zenity --title="What would you like to do?" --text="Select the task y\
-ou wish to perform, then click \"OK\"" --list  --column="task" --column="Activ\
-ity" --hide-column=1 "reg" "Register for Account" "web" "Browse the Web")
-[ $? -eq 0 ] || exit 0
-if [ "$choice" = "reg" ]; then
-    errtext="An error occurred while trying to launch the registration applet.  Please try another workstation."
-    classzip="/afs/athena.mit.edu/system/register/java/regclasses.zip"
-    if [ ! -r "$classzip" ]; then
-	zenity --error --text="${errtext}\n\n(could not unzip class file)"
-	exit 0
-    fi
-    unzip $classzip
-    java -Dhost="moira.mit.edu" regapplet.Regapplet || zenity --error --text="${errtext}\n\n(could not launch java)"
-    exit 0
-fi
-
-# Warn the user that printing is wrong.
-zenity --warning --title="No Printing" --text="You will not be able to print from this browser session.  Submitted print jobs will be discarded and cannot be released from Pharos printers.\n\nIf you need to print, please log in to a normal Athena session.  If you are a visitor looking to print a Campus Map, please visit the Information Center in Room 7-121."
-
-# Create a new firefox profile.
-rm -rf .mozilla
-firefox -CreateProfile default > /dev/null || exit 1
-profdir=$(find .mozilla/firefox -type d -name \*.default)
-
-# Add the rkiosk extension.
-rkiosk_dir="$profdir/extensions/$rkiosk_id"
-mkdir -p "$rkiosk_dir"
-(cd "$rkiosk_dir" && unzip "$rkiosk_xpi") || exit 1
-cat <<EOF >> "$profdir/extensions.ini"
-[ExtensionDirs]
-Extension0=$rkiosk_dir
-EOF
-
-# Firefox 3.6+ requires a chrome.manifest for the extension.
-if [ ! -e "$rkiosk_dir/chrome.manifest" ]; then
-  cp "$datadir/chrome.manifest.r-kiosk" "$rkiosk_dir/chrome.manifest" || exit 1
-fi
-
-# Apply our preference settings and UI customizations.
-cat "$prefs" >> "$profdir/prefs.js" || exit 1
-mkdir -p "$profdir/chrome"
-cp "$chrome" "$profdir/chrome/userChrome.css" || exit 1
-
-# Launch firefox.
-if [ "$(machtype -q)" = "quickstation" ] && [ -x /usr/bin/bugme ]; then
-    bugme --fatal --corner SE firefox
-else
-    firefox
-fi
-
-
-# Clean up.
-rm -rf .mozilla

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