This repository is the On-Device code for a bartender in the MrBartender suite.
Start with Raspbian Lite Image.
- node.js (
v10.12
) - mongodb
- pm2
- unclutter
- chromium-browser
- xorg
- openbox
- lightdm
- git
- Install required software
- Create user
kiosk-user
- Edit
/etc/lightdm/lightdm.conf
to have the following values:
autologin-user=kiosk-user
user-session=openbox
- Edit
/etc/xdg/openbox/autostart
to contain the values in thekiosk/autostart
file in this repo - Create folder
/home/kiosk-user/mrbartender
, then enter it - Run
git clone https://github.com/MrBartender/device.git .
to clone the repo into this folder - Run
npm install
to install the dependencies for the app
Reboot, and it should be good to go!
Note, it might be necessary to set boot mode to GUI autologin.
Enter the MrBartender folder with:
$ cd /home/kiosk-user/mrbartender
and run
$ git pull
once that finishes, update the dependencies
$ npm install
That's it!
Run the following commands:
$ sudo apt update
$ sudo apt upgrade
That should update everything necessary.
Copy helper script:
$ cp ./kiosk/mb_local /bin/mb
add execute permission
Development watch script (from root dir):
$ watchify src/core.js -o public/js/bundle.js & nodemon index.js
Note: Don't forget to run kill
on the background process when canceling!
Make Production:
$ browserify src/core.js -o public/js/bundle.js
$ npm run build