Spacebar

From HSG Wiki
Revision as of 14:33, 25 November 2018 by Thequux (talk | contribs) (Touch Screen: Added calibration information)
Jump to: navigation, search

POS Kiosk to allow for easy money management. Current software made by User:Bloemist can be found on Github. Check out the raw datalog for a json-formatted sales history.

Touch Screen

To configure the touch screen on linux please refer to this page.

Calibration:

To test the parameters, use xinput set-prop "Elo Serial TouchScreen" "libinput Calibration Matrix" 0.985 0 0.02 0 -0.995 1.01 0 0 1

To apply it to the system at boot, fill /etc/X11/xorg.conf.d/99-calibration.conf with:

Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"Elo Serial TouchScreen"
	Driver "libinput"
	Option  "CalibrationMatrix" "0.985 0 0.02  0 -0.995 1.01  0 0 1"
EndSection

Barcode Scanner

The build in barcode scanner can be activated and read out by following commands:

/bin/stty -F /dev/ttyUSB0 19200 raw -echo
cat /dev/ttyUSB0

Upgrade to 16.04

Don't break what doesn't need fixing!

Barmaid was upgraded from lubuntu 14.04 to 16.04 on April 2018. This broke usability, notably no GUI started. (the machine was still reachable by SSH and it still served the bar page (console shows nothing))

In an attempt to restore usability, the following was done:

  • modified /etc/default/grub like this [1]
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

This fixed bootup, the next issue was that the touchscreen didn't respond. (maybe because 16.04 introduced systemd.[2])

  • added the following to /etc/rc.local [3]
inputattach -elo /dev/ttyS1 --daemon

That fixed the touchscreen. Next, the screen would not turn back on after locking. Restarting LightDM would bring things back, so the issue was probably there. /var/log/lightdm/lightdm.log showed "Seat seat0: Failed to find session configuration light-gtk-greeter" A search returned nothing about "light-gtk-greeter" but did show "lightdm-gtk-greeter"

  • changed /etc/lightdm/lightdm.conf from "light-gtk-greeter" to
greeter-session=lightdm-gtk-greeter

That made the screen wakes "correctly" but it requires the user password.

  • disabled password on login (the machine should be logged in anytime anyone approaches it anyway)

Now upon waking the machine, the user has to press "ontgrendelen", but gets back to the bar page instantly after that.

Update,

  • spacebar console (tally) was fixed
  • "greeter" config in /etc/lightdm/lightdm.conf was commented out
    • still locks out after screensaving
  • automatic locking was disabled at light locker settings

TODO

  • find a systematic fix (instead of the symptomatic one outlined here)
  • get rid of the "unlock" stage after waking
  • calibrate the touchscreen
  • find a convenient OS installation method
    • make a system backup
  • get a better documentation on how to set up a new instance of Spacebar (in case of OS re-installation)
  • replace the entire thing with a raspberry pi + touchscreen?

Security

Added .htaccess files to webroot and /spacebar-data, both require localhost to access now

webroot:
order deny,allow
deny from all
allow from localhost

Please do not circumvent any security measures without providing us with a writeup.