aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-10-27 09:49:10 -0500
committerDavid Barksdale <amatus@amatus.name>2014-10-27 09:49:10 -0500
commit744ca80687aea3a9f0160a87d26f175a1c28a288 (patch)
treef91d965bfd5d5a1aa7219eb4748f4eacc7a783b4
parentb7506ecfda9fe30d4b29af5ca2cba8992c5ec6cb (diff)
New script for users of the GoBook XR-1
-rwxr-xr-xgobook-xr1-touchscreen33
-rwxr-xr-xgobook-xr1.sh11
2 files changed, 44 insertions, 0 deletions
diff --git a/gobook-xr1-touchscreen b/gobook-xr1-touchscreen
new file mode 100755
index 0000000..1e42cf9
--- /dev/null
+++ b/gobook-xr1-touchscreen
@@ -0,0 +1,33 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: gobook-xr1-touchscreen
+# Required-Start: $syslog $remote_fs
+# Required-Stop: $syslog $remote_fs
+# Should-Start:
+# Should-Stop:
+# X-Start-Before:
+# X-Stop-After:
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: GoBook XR-1 Touchscreen
+# Description: Runs inputattach on the touchscreen's serial device
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/inputattach
+SCRIPTNAME=gobook-xr1-touchscreen
+
+# Exit if the package is not installed
+test -x $DAEMON || exit 0
+
+case "$1" in
+ start)
+ "$DAEMON" --daemon --always -t213 /dev/ttyS3
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
diff --git a/gobook-xr1.sh b/gobook-xr1.sh
new file mode 100755
index 0000000..cacefce
--- /dev/null
+++ b/gobook-xr1.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Enable touchscreen
+sudo install -m 755 gobook-xr1-touchscreen /etc/init.d/
+sudo update-rc.d gobook-xr1-touchscreen defaults
+
+# Calibrate touchscreen
+sudo apt-get install -y xinput-calibrator
+xinput_calibrator | sed -n -e '/Section/,/EndSection/p' > 99-calibration.conf
+sudo install -m 644 99-calibration.conf /usr/share/X11/xorg.conf.d/
+rm 99-calibration.conf