diff options
author | David Barksdale <amatus@amatus.name> | 2014-10-27 09:49:10 -0500 |
---|---|---|
committer | David Barksdale <amatus@amatus.name> | 2014-10-27 09:49:10 -0500 |
commit | 744ca80687aea3a9f0160a87d26f175a1c28a288 (patch) | |
tree | f91d965bfd5d5a1aa7219eb4748f4eacc7a783b4 | |
parent | b7506ecfda9fe30d4b29af5ca2cba8992c5ec6cb (diff) |
New script for users of the GoBook XR-1
-rwxr-xr-x | gobook-xr1-touchscreen | 33 | ||||
-rwxr-xr-x | gobook-xr1.sh | 11 |
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 |