Spacebar

From HSG Wiki
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[edit]

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

Calibration[edit]

To test the parameters, run

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

Configuration at boot[edit]

Put the following in /etc/systemd/system/elographics.service

[Unit]
Description=Connect elographics input device
BindsTo=sys-devices-platform-serial8250-tty-ttyS3.device
After=sys-devices-platform-serial8250-tty-ttyS3.device

[Service]
ExecStart=/usr/bin/inputattach -elo /dev/ttyS1

[Install]
WantedBy=multi-user.target

Then, enable it using

sudo systemctl enable elographics.service

Frontend[edit]

The source code is on github. Clone that repo, and run

dpkg-buildpackage --no-sign

Then, simply install the resulting package (found in the parent directory)

The following configuration added to the end of ~/.config/i3/config will tell i3 to run the UI in fullscreen at startup:

for_window [class="tab"] fullscreen
exec env LIBGL_ALWAYS_SOFTWARE=1 /usr/bin/tab-ui

When we upgrade the kiosk to something supporting a more recent version of OpenGL (>= 2.0), the last line can be changed to exec /usr/bin/tab-ui

Backend[edit]

See the documentation at https://github.com/0x20/backtab

Barcode Scanner[edit]

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[edit]

NOTE: This is no longer relevant after the switch to Tab. It is only of historical interest

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[edit]

  • 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[edit]

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.