diff -urN xserver-tiny-h3600_4.1-16/CONTROL/control xserver-tiny-h3600_4.1-18/CONTROL/control
--- xserver-tiny-h3600_4.1-16/CONTROL/control	Thu Jan  3 13:32:21 2002
+++ xserver-tiny-h3600_4.1-18/CONTROL/control	Fri May  3 11:33:59 2002
@@ -1,6 +1,6 @@
 Package: xserver-tiny-h3600
 Priority: optional
-Version: 4.1-16
+Version: 4.1-18
 Architecture: arm
 Section: x11
 Maintainer: Jim Gettys <jg@handhelds.org>
diff -urN xserver-tiny-h3600_4.1-16/CONTROL/control~ xserver-tiny-h3600_4.1-18/CONTROL/control~
--- xserver-tiny-h3600_4.1-16/CONTROL/control~	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/CONTROL/control~	Mon Feb 11 12:15:36 2002
@@ -0,0 +1,9 @@
+Package: xserver-tiny-h3600
+Priority: optional
+Version: 4.1-17
+Architecture: arm
+Section: x11
+Maintainer: Jim Gettys <jg@handhelds.org>
+Depends: libc6, zlib1g, h3600-utils
+Description: X server for the iPAQ H3xxx display, touchscreen, and 
+  optional HP VGA PC Card.  Can also run on other fbdev displays.
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/20xBacklight xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/20xBacklight
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/20xBacklight	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/20xBacklight	Wed Feb 13 14:24:54 2002
@@ -0,0 +1 @@
+bl 1 1 32
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/30xTs_Calibrate xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/30xTs_Calibrate
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/30xTs_Calibrate	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/30xTs_Calibrate	Wed Feb 13 14:27:36 2002
@@ -0,0 +1,8 @@
+if [ -f /etc/xcalibrate.conf ]; then
+	echo "Restoring touch screen calibration"
+	/usr/X11R6/bin/xcalibrate -cal `cat /etc/xcalibrate.conf`
+fi
+#
+# MAYBE this should happen last so we can launch the calibrate 
+#       program if calibration is not found ?
+#
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/50xWindow-Manager xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/50xWindow-Manager
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/50xWindow-Manager	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/50xWindow-Manager	Wed Feb 13 14:28:02 2002
@@ -0,0 +1 @@
+x-window-manager &
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/55xScreenSaver xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/55xScreenSaver
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/55xScreenSaver	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/55xScreenSaver	Mon Feb 11 12:14:57 2002
@@ -0,0 +1,2 @@
+xset s 30 180
+xset s off
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/60xXDefaults xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/60xXDefaults
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/60xXDefaults	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/60xXDefaults	Mon Feb 11 12:14:57 2002
@@ -0,0 +1,2 @@
+xrdb -load -nocpp < /etc/X11/Xdefaults
+xrdb -load -nocpp < /root/.Xdefaults
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/65xMenu xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/65xMenu
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/65xMenu	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/65xMenu	Mon Feb 11 12:14:57 2002
@@ -0,0 +1,2 @@
+if [ -x /usr/bin/x-menu-manager ]; then x-menu-manager & fi
+sleep 1;
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/65xstroke xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/65xstroke
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/65xstroke	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/65xstroke	Wed Feb 13 14:26:18 2002
@@ -0,0 +1 @@
+if [ -x /usr/X11R6/bin/xstroke ]; then xstroke & fi
diff -urN xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/99xCommon_Start xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/99xCommon_Start
--- xserver-tiny-h3600_4.1-16/etc/X11/Xsession.d/99xCommon_Start	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/X11/Xsession.d/99xCommon_Start	Wed Feb 13 14:26:48 2002
@@ -0,0 +1,2 @@
+## This should probably be named differently
+if [ -f /root/.xsession ]; then source /root/.xsession & fi
diff -urN xserver-tiny-h3600_4.1-16/etc/init.d/x xserver-tiny-h3600_4.1-18/etc/init.d/x
--- xserver-tiny-h3600_4.1-16/etc/init.d/x	Thu Jan  3 14:49:59 2002
+++ xserver-tiny-h3600_4.1-18/etc/init.d/x	Fri May  3 11:33:47 2002
@@ -12,13 +12,28 @@
 }
 
 module_id() {
-    grep "Module ID" /proc/hal/assets | sed "s/.*://"
+    ## used to read from assets, but sometimes assets is corrupted
+    # grep "Module ID" /proc/hal/assets | sed "s/.*://"
+    echo ' iPAQ' `cat /proc/hal/model`
 }
+
+run_parts () {
+  for F in $(ls $1); do
+    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
+      if [ -f "$1/$F" ]; then
+        echo "$1/$F"
+      fi
+    fi
+  done;
+}
+
 export USER=root
 export HOME=/root
 export XAPPLRESDIR=/usr/X11R6/lib/app-defaults
 export XFILESEARCHPATH=./%N%S%C.ad:/usr/X11R6/lib/X11/%L/%T/%N%S%C:/usr/X11R6/lib/X11/%l/%T/%N%S%C:/usr/X11R6/lib/X11/%T/%N%S%C:./%N%S.ad:/usr/X11R6/lib/X11/%L/%T/%N%S:/usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/app-defaults/%N%S%C.ad
 
+SYSSESSIONDIR=/etc/X11/Xsession.d
+
 case $1 in
 'start')
 	echo "Starting X..."
@@ -36,32 +51,12 @@
 		* ) echo "Unknown processor type -`module_id`-!" ;;
 	esac
 
-	bl 1 1 32
-
-	if [ -f /etc/xcalibrate.conf ]; then
-		echo "Restoring touch screen calibration"
-		/usr/X11R6/bin/xcalibrate -cal `cat /etc/xcalibrate.conf`
+	SESSIONFILES=$(run_parts $SYSSESSIONDIR)
+	if [ -n "$SESSIONFILES" ]; then
+	for SESSIONFILE in $SESSIONFILES; do
+	    . $SESSIONFILE
+	done
 	fi
-
-        ## put the display in portrait mode
-#        xrandr -o left
-
-	x-window-manager &
-
-#       set initial cycle values to something more sensible...
-	xset s 30 180
-#	then disable it....
-	xset s off
-
-	# -nocpp since there is no C pre-processor.
-	xrdb -load -nocpp < /etc/X11/Xdefaults
-	xrdb -load -nocpp < /root/.Xdefaults
-
-	if [ -x /usr/bin/x-menu-manager ]; then x-menu-manager & fi
-	sleep 1;
-	if [ -x /usr/X11R6/bin/xstroke ]; then xstroke & fi
-# 	now startup the user's apps, if any...
-	if [ -f /root/.xsession ]; then source .xsession & fi
 	
 	;;
 'stop')
diff -urN xserver-tiny-h3600_4.1-16/etc/init.d/x~ xserver-tiny-h3600_4.1-18/etc/init.d/x~
--- xserver-tiny-h3600_4.1-16/etc/init.d/x~	Wed Dec 31 19:00:00 1969
+++ xserver-tiny-h3600_4.1-18/etc/init.d/x~	Fri May  3 11:32:49 2002
@@ -0,0 +1,70 @@
+#!/bin/sh
+# 
+if [ ! -x /usr/X11R6/bin/Xipaq ] ; then exit 0 ; fi
+
+. /etc/profile
+
+killproc() {            # kill the named process(es)
+        pid=`/bin/ps -e |
+             /bin/grep $1 |
+             /bin/sed -e 's/^  *//' -e 's/ .*//'`
+        [ "$pid" != "" ] && kill $pid
+}
+
+module_id() {
+    grep "Module ID" /proc/hal/assets | sed "s/.*://"
+    echo ' iPAQ' `cat /proc/hal/model`
+}
+
+run_parts () {
+  for F in $(ls $1); do
+    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
+      if [ -f "$1/$F" ]; then
+        echo "$1/$F"
+      fi
+    fi
+  done;
+}
+
+export USER=root
+export HOME=/root
+export XAPPLRESDIR=/usr/X11R6/lib/app-defaults
+export XFILESEARCHPATH=./%N%S%C.ad:/usr/X11R6/lib/X11/%L/%T/%N%S%C:/usr/X11R6/lib/X11/%l/%T/%N%S%C:/usr/X11R6/lib/X11/%T/%N%S%C:./%N%S.ad:/usr/X11R6/lib/X11/%L/%T/%N%S:/usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/app-defaults/%N%S%C.ad
+
+SYSSESSIONDIR=/etc/X11/Xsession.d
+
+case $1 in
+'start')
+	echo "Starting X..."
+
+	cd $HOME
+
+# start off server in conventional location.
+	echo `module_id`
+	case `module_id` in
+		" iPAQ 3100" )	    Xipaq -screen 240x320@90 -dpi 100 & ;;
+		" iPAQ 3600" )	    Xipaq -screen 240x320@270 -dpi 100 & ;;
+		" iPAQ 3700" )	    Xipaq -screen 240x320@270 -dpi 100 & ;;
+		" iPAQ 3800" )	    Xipaq -screen 240x320@90 -dpi 100 & ;;
+
+		* ) echo "Unknown processor type -`module_id`-!" ;;
+	esac
+
+	SESSIONFILES=$(run_parts $SYSSESSIONDIR)
+	if [ -n "$SESSIONFILES" ]; then
+	for SESSIONFILE in $SESSIONFILES; do
+	    . $SESSIONFILE
+	done
+	fi
+	
+	;;
+'stop')
+        echo "Killing X..."
+        killproc Xipaq
+	dd if=/dev/zero of=/dev/fb0
+        ;;
+*)
+        echo "usage: $0 { start | stop }"
+        ;;
+esac
+
diff -urN xserver-tiny-h3600_4.1-16/etc/rc2.d/S99x xserver-tiny-h3600_4.1-18/etc/rc2.d/S99x
--- xserver-tiny-h3600_4.1-16/etc/rc2.d/S99x	Thu Jan  3 14:49:59 2002
+++ xserver-tiny-h3600_4.1-18/etc/rc2.d/S99x	Fri May  3 11:33:47 2002
@@ -12,13 +12,28 @@
 }
 
 module_id() {
-    grep "Module ID" /proc/hal/assets | sed "s/.*://"
+    ## used to read from assets, but sometimes assets is corrupted
+    # grep "Module ID" /proc/hal/assets | sed "s/.*://"
+    echo ' iPAQ' `cat /proc/hal/model`
 }
+
+run_parts () {
+  for F in $(ls $1); do
+    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
+      if [ -f "$1/$F" ]; then
+        echo "$1/$F"
+      fi
+    fi
+  done;
+}
+
 export USER=root
 export HOME=/root
 export XAPPLRESDIR=/usr/X11R6/lib/app-defaults
 export XFILESEARCHPATH=./%N%S%C.ad:/usr/X11R6/lib/X11/%L/%T/%N%S%C:/usr/X11R6/lib/X11/%l/%T/%N%S%C:/usr/X11R6/lib/X11/%T/%N%S%C:./%N%S.ad:/usr/X11R6/lib/X11/%L/%T/%N%S:/usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/app-defaults/%N%S%C.ad
 
+SYSSESSIONDIR=/etc/X11/Xsession.d
+
 case $1 in
 'start')
 	echo "Starting X..."
@@ -36,32 +51,12 @@
 		* ) echo "Unknown processor type -`module_id`-!" ;;
 	esac
 
-	bl 1 1 32
-
-	if [ -f /etc/xcalibrate.conf ]; then
-		echo "Restoring touch screen calibration"
-		/usr/X11R6/bin/xcalibrate -cal `cat /etc/xcalibrate.conf`
+	SESSIONFILES=$(run_parts $SYSSESSIONDIR)
+	if [ -n "$SESSIONFILES" ]; then
+	for SESSIONFILE in $SESSIONFILES; do
+	    . $SESSIONFILE
+	done
 	fi
-
-        ## put the display in portrait mode
-#        xrandr -o left
-
-	x-window-manager &
-
-#       set initial cycle values to something more sensible...
-	xset s 30 180
-#	then disable it....
-	xset s off
-
-	# -nocpp since there is no C pre-processor.
-	xrdb -load -nocpp < /etc/X11/Xdefaults
-	xrdb -load -nocpp < /root/.Xdefaults
-
-	if [ -x /usr/bin/x-menu-manager ]; then x-menu-manager & fi
-	sleep 1;
-	if [ -x /usr/X11R6/bin/xstroke ]; then xstroke & fi
-# 	now startup the user's apps, if any...
-	if [ -f /root/.xsession ]; then source .xsession & fi
 	
 	;;
 'stop')
