grader-display v0.7.0
Linux Install
- Ubuntu 18.04 Server LTS
- Open SSH Server
- Install Plasma on Ubuntu 18.04 LTS
sudo apt install tasksel
sudo tasksel install kubuntu-desktop
sudo apt install sddm
sudo dpkg-reconfigure sddm
reboot
- Login as user created during Ubuntu install
- Reboot
Kiosk Setup
ssh to machine as user created above
ssh-copy-id <user>@<ip address>
ssh <user>@<ip address>
Add the following to the files listed below:
Auto login
sudo nano /etc/sddm.conf
[Autologin]
User=<user>
Auto start
Unclutter hides the mouse in the startup script
sudo apt-get install unclutter
nano ~/.config/autostart-scripts/startup
#!/bin/bash
~/tannery/grader-display &
unclutter -idle 3 &
chmod +x ~/.config/autostart-scripts/startup
Power saving options
nano ~/.config/powermanagementprofilesrc
[AC][DPMSControl]
idleTime=0
[AC][DimDisplay]
idleTime=0
[AC][SusoendSession]
idleTime=0
suspendType=0
Screen Locking
nano ~/.config/kscreenlockerrc
[Daemon]
Autolock=false
Hot Corners
nano ~/.config/kwinrc
[ElectricBorders]
Bottom=None
BottomLeft=None
BottomRight=None
Left=None
Right=None
Top=None
TopLeft=None
TopRight=None
Deploy App
Locally run the following
ssh <user>@<ip address> 'mkdir -p ~/tannery'
scp -r ./dist/linux-unpacked/* kiosk@192.168.5.170:~/tannery
##Reboot kiosk machine
If everything is good, electron app will start in fullscreen and should not be able to be exited via touch screen
Alt-F4
To exit
Auto Update
public/electron.js
const { autoUpdater } = require('electron-updater')
app.on('ready', function() {
autoUpdater.checkForUpdatesAndNotify()
})
package.json
"build": {
"publish": [
{
"provider": "github",
"owner": "nickvirtue",
"repo": "testing"
}
],
"linux": {
"target": [
"AppImage"
]
},
Publish
export GH_TOKEN="<YOUR_TOKEN_HERE>"
yarn release
Message format
{
"footwear": { "grade": "4th" },
"grains": { "grade": "C2" },
"upholstery": { "grade": "C2" },
"skin": { "weight": "45.5", "scar": "true" }
}
Redis/Docker
Assuming docker is alerardy installed ###Start a new container running Redis
docker run -d -p 6379:6379 --name redis1 redis
Here we're giving it a name (redis1
) and exposing port 6379
(the Redis default)
Check it's running with
docker ps
###Run the Redis CLI in the container
We're going to start a new interactive session (-it
) inside the running container, and use it to run redis-cli
. We could run it directly, but for now, let's just start a shell with sh
:
docker exec -it redis1 sh
And now we're attached to our container. Let's run redis-cli
:
# redis-cli
###Try out some basic Redis commands
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> PUBLISH "channel" "Message content......"
(integer) 1
127.0.0.1:6379> PUBLISH "news" '{"footwear": {"grade": "4th"}, "grains": {"grade": "C2"}, "upholstery": {"grade": "C2"}}'
(integer) 1
ping raspberrypi
<-- get IP
scp -P 4502 dist/Grader-Display-0.1.0-arm64.AppImage nick@192.168.5.191:~/
4 years ago